Skip to content

Commit

Permalink
docs(fromEvent): get click events from document, rather than button
Browse files Browse the repository at this point in the history
hi.
`Error: button is not defined`
`Error: clicks$ is not defined`
  • Loading branch information
xeptore authored and benlesh committed Mar 15, 2019
1 parent fb9bc48 commit af1324b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/internal/operators/throwIfEmpty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import { MonoTypeOperatorFunction } from '../types';
* import { fromEvent, timer } from 'rxjs';
* import { throwIfEmpty, takeUntil } from 'rxjs/operators';
*
* const click$ = fromEvent(button, 'click');
* const click$ = fromEvent(document, 'click');
*
* clicks$.pipe(
* click$.pipe(
* takeUntil(timer(1000)),
* throwIfEmpty(
* () => new Error('the button was not clicked within 1 second')
* () => new Error('the document was not clicked within 1 second')
* ),
* )
* .subscribe({
Expand Down

0 comments on commit af1324b

Please sign in to comment.