mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 14:14:36 +08:00
This is a reland of 4df552c652
Original change's description:
> Updates node_modules and update script
>
> Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Change-Id: I97d1442c21420488fadde3f17f67cd4e3b959be6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880030
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
61 lines
2.0 KiB
TypeScript
61 lines
2.0 KiB
TypeScript
import { Observable } from '../Observable';
|
|
import { SchedulerLike } from '../types';
|
|
/**
|
|
* The same Observable instance returned by any call to {@link empty} without a
|
|
* `scheduler`. It is preferrable to use this over `empty()`.
|
|
*/
|
|
export declare const EMPTY: Observable<never>;
|
|
/**
|
|
* Creates an Observable that emits no items to the Observer and immediately
|
|
* emits a complete notification.
|
|
*
|
|
* <span class="informal">Just emits 'complete', and nothing else.
|
|
* </span>
|
|
*
|
|
* 
|
|
*
|
|
* This static operator is useful for creating a simple Observable that only
|
|
* emits the complete notification. It can be used for composing with other
|
|
* Observables, such as in a {@link mergeMap}.
|
|
*
|
|
* ## Examples
|
|
* ### Emit the number 7, then complete
|
|
* ```ts
|
|
* import { empty } from 'rxjs';
|
|
* import { startWith } from 'rxjs/operators';
|
|
*
|
|
* const result = empty().pipe(startWith(7));
|
|
* result.subscribe(x => console.log(x));
|
|
* ```
|
|
*
|
|
* ### Map and flatten only odd numbers to the sequence 'a', 'b', 'c'
|
|
* ```ts
|
|
* import { empty, interval, of } from 'rxjs';
|
|
* import { mergeMap } from 'rxjs/operators';
|
|
*
|
|
* const interval$ = interval(1000);
|
|
* const result = interval$.pipe(
|
|
* mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : empty()),
|
|
* );
|
|
* result.subscribe(x => console.log(x));
|
|
*
|
|
* // Results in the following to the console:
|
|
* // x is equal to the count on the interval eg(0,1,2,3,...)
|
|
* // x will occur every 1000ms
|
|
* // if x % 2 is equal to 1 print abc
|
|
* // if x % 2 is not equal to 1 nothing will be output
|
|
* ```
|
|
*
|
|
* @see {@link Observable}
|
|
* @see {@link never}
|
|
* @see {@link of}
|
|
* @see {@link throwError}
|
|
*
|
|
* @param scheduler A {@link SchedulerLike} to use for scheduling
|
|
* the emission of the complete notification.
|
|
* @return An "empty" Observable: emits only the complete
|
|
* notification.
|
|
* @deprecated Deprecated in favor of using {@link EMPTY} constant, or {@link scheduled} (e.g. `scheduled([], scheduler)`)
|
|
*/
|
|
export declare function empty(scheduler?: SchedulerLike): Observable<never>;
|