UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

11 lines (8 loc) 306 B
import { of } from 'rxjs'; import { share } from 'rxjs/operators'; it('should infer correctly', () => { const o = of('foo', 'bar', 'baz').pipe(share()); // $ExpectType Observable<string> }); it('should enforce types', () => { const o = of('foo', 'bar', 'baz').pipe(share('abc')); // $ExpectError });