rxjs6 常用引入方式整理

创建 Observable 的方法、types、schedulers 和一些工具方法:

import { 
	Observable, Subject, asapScheduler, pipe, of, from, interval, merge, range, timer, empty,
	never, throwError, fromEvent, fromEventPattern, SubscriptionLike, PartialObserver, 
	defer, forkJoin, ReplaySubject, AsyncSubject, asyncScheduler
} from 'rxjs';

管道操作符:

import { map, mapTo, filter, scan, every, take, takeLast, takeUntil, takeWhile, tap, delay, delayWhen,
    skip, skipLast, skipUntil, skipWhile, concat, concatAll, concatMap, concatMapTo, toArray,
    merge, mergeAll, mergeMap, mergeMapTo, mergeScan, combineAll, combineLatest, race, reduce,
    zip, zipAll, switchAll, switchMap, switchMapTo, withLatestFrom, buffer, bufferCount, refCount,
    bufferTime, bufferToggle, bufferWhen, debounce, debounceTime, throttle, throttleTime, throwIfEmpty,
    timeInterval, timeout, timeoutWith, timestamp, distinct, distinctUntilChanged, distinctUntilKeyChanged,
    retry, retryWhen, repeat, repeatWhen, finalize, find, findIndex, flatMap, pluck, pairwise, partition,
    publish, publishBehavior, publishLast, publishReplay, materialize, max, min, multicast,
    sample, sampleTime, sequenceEqual, share, shareReplay, single, subscribeOn
} from 'rxjs/operators';

websocket subject:

import { webSocket } from 'rxjs/webSocket';

Rx ajax:

import { ajax } from 'rxjs/ajax';

RxJS的测试工具库:

import { TestScheduler } from 'rxjs/testing';

你可能感兴趣的:(rxjs学习篇)