Skip to content

Commit

Permalink
chore(map): update dtslint
Browse files Browse the repository at this point in the history
  • Loading branch information
demensky committed Jan 19, 2023
1 parent 0837811 commit 457c915
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions spec-dtslint/operators/map-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ it('should support an index parameter', () => {
const o = of('a', 'b', 'c').pipe(map((value, index) => index)); // $ExpectType Observable<number>
});

it('should support an extra parameter', () => {
const o = of(1, 2, 3).pipe(map(value => value, 'something')); // $ExpectType Observable<number>
});

it('should enforce types', () => {
const o = of(1, 2, 3).pipe(map()); // $ExpectError
});
Expand All @@ -25,16 +21,3 @@ it('should enforce the projector types', () => {
const o = of(1, 2, 3).pipe(map((value: string) => value)); // $ExpectError
const p = of(1, 2, 3).pipe(map((value, index: string) => value)); // $ExpectError
});

it('should support this', () => {
const thisArg = { limit: 2 };
const o = of(1, 2, 3).pipe(map(function (val) {
const limit = this.limit; // $ExpectType number
return val < limit ? val : limit;
}, thisArg));
});

it('should deprecate thisArg usage', () => {
const a = of(1, 2, 3).pipe(map((value) => value)); // $ExpectNoDeprecation
const b = of(1, 2, 3).pipe(map((value) => value, {})); // $ExpectDeprecation
});

0 comments on commit 457c915

Please sign in to comment.