Skip to content

Commit

Permalink
test(dtslint): add debounceTime
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Sep 5, 2018
1 parent c89040e commit afb0d34
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec-dtslint/operators/debounceTime-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { of, asyncScheduler } from 'rxjs';
import { debounceTime } from 'rxjs/operators';

it('should infer correctly', () => {
const o = of(1, 2, 3).pipe(debounceTime(47)); // $ExpectType Observable<number>
});

it('should support a scheduler', () => {
const o = of(1, 2, 3).pipe(debounceTime(47, asyncScheduler)); // $ExpectType Observable<number>
});

it('should enforce types', () => {
const o = of(1, 2, 3).pipe(debounceTime()); // $ExpectError
const p = of(1, 2, 3).pipe(debounceTime('foo')); // $ExpectError
const q = of(1, 2, 3).pipe(debounceTime(47, 'foo')); // $ExpectError
});

0 comments on commit afb0d34

Please sign in to comment.