Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1011 bytes
|
Line | |
---|
1 | import { Observable } from '../Observable';
|
---|
2 | import { OperatorFunction } from '../types';
|
---|
3 | /**
|
---|
4 | * Returns an Observable that emits whether or not every item of the source satisfies the condition specified.
|
---|
5 | *
|
---|
6 | * ## Example
|
---|
7 | * A simple example emitting true if all elements are less than 5, false otherwise
|
---|
8 | * ```ts
|
---|
9 | * import { of } from 'rxjs';
|
---|
10 | * import { every } from 'rxjs/operators';
|
---|
11 | *
|
---|
12 | * of(1, 2, 3, 4, 5, 6).pipe(
|
---|
13 | * every(x => x < 5),
|
---|
14 | * )
|
---|
15 | * .subscribe(x => console.log(x)); // -> false
|
---|
16 | * ```
|
---|
17 | *
|
---|
18 | * @param {function} predicate A function for determining if an item meets a specified condition.
|
---|
19 | * @param {any} [thisArg] Optional object to use for `this` in the callback.
|
---|
20 | * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified.
|
---|
21 | * @method every
|
---|
22 | * @owner Observable
|
---|
23 | */
|
---|
24 | export declare function every<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): OperatorFunction<T, boolean>;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.