Skip to content

Commit 961d98b

Browse files
committed
fix: remove leftover params from breaking changes
1 parent 5af28f7 commit 961d98b

File tree

4 files changed

+47
-69
lines changed

4 files changed

+47
-69
lines changed

packages/rxjs/spec-dtslint/operators/every-spec.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,3 @@ it('should handle the Boolean constructor', () => {
4545
const d = of(NaN, NaN, NaN).pipe(every(Boolean)); // $ExpectType Observable<boolean>
4646
const e = of(0, 1, 0).pipe(every(Boolean)); // $ExpectType Observable<boolean>
4747
})
48-
49-
it('should support this', () => {
50-
const thisArg = { limit: 5 };
51-
const a = of(1, 2, 3).pipe(every(function (val) {
52-
const limit = this.limit; // $ExpectType number
53-
return val < limit;
54-
}, thisArg));
55-
});
56-
57-
it('should deprecate thisArg usage', () => {
58-
const a = of(1, 2, 3).pipe(every(Boolean)); // $ExpectNoDeprecation
59-
const b = of(1, 2, 3).pipe(every(Boolean, {})); // $ExpectDeprecation
60-
const c = of(1, 2, 3).pipe(every((value) => Boolean(value))); // $ExpectNoDeprecation
61-
const d = of(1, 2, 3).pipe(every((value) => Boolean(value), {})); // $ExpectDeprecation
62-
});
Lines changed: 47 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,47 @@
1-
import { of, asyncScheduler } from 'rxjs';
2-
import { expand } from 'rxjs/operators';
3-
4-
it('should infer correctly', () => {
5-
const o = of(1, 2, 3).pipe(expand(value => of(value))); // $ExpectType Observable<number>
6-
const p = of(1, 2, 3).pipe(expand(value => [value])); // $ExpectType Observable<number>
7-
const q = of(1, 2, 3).pipe(expand(value => Promise.resolve(value))); // $ExpectType Observable<number>
8-
});
9-
10-
it('should infer correctly with a different type as the source', () => {
11-
const o = of(1, 2, 3).pipe(expand(value => of('foo'))); // $ExpectType Observable<string>
12-
const p = of(1, 2, 3).pipe(expand(value => ['foo'])); // $ExpectType Observable<string>
13-
const q = of(1, 2, 3).pipe(expand(value => Promise.resolve('foo'))); // $ExpectType Observable<string>
14-
});
15-
16-
it('should support a project function with index', () => {
17-
const o = of(1, 2, 3).pipe(expand((value, index) => of(index))); // $ExpectType Observable<number>
18-
});
19-
20-
it('should support concurrent parameter', () => {
21-
const o = of(1, 2, 3).pipe(expand(value => of(1), 47)); // $ExpectType Observable<number>
22-
});
23-
24-
it('should support a scheduler', () => {
25-
const o = of(1, 2, 3).pipe(expand(value => of(1), 47, asyncScheduler)); // $ExpectType Observable<number>
26-
});
27-
28-
it('should enforce types', () => {
29-
const o = of(1, 2, 3).pipe(expand()); // $ExpectError
30-
});
31-
32-
it('should enforce project types', () => {
33-
const o = of(1, 2, 3).pipe(expand((value: string, index) => of(1))); // $ExpectError
34-
const p = of(1, 2, 3).pipe(expand((value, index: string) => of(1))); // $ExpectError
35-
});
36-
37-
it('should enforce project return type', () => {
38-
const o = of(1, 2, 3).pipe(expand(value => 1)); // $ExpectError
39-
});
40-
41-
it('should enforce concurrent type', () => {
42-
const o = of(1, 2, 3).pipe(expand(value => of(1), 'foo')); // $ExpectError
43-
});
44-
45-
it('should enforce scheduler type', () => {
46-
const o = of(1, 2, 3).pipe(expand(value => of(1), 47, 'foo')); // $ExpectError
47-
});
48-
49-
it('should support union types', () => {
50-
const o = of(1).pipe(expand(x => typeof x === 'string' ? of(123) : of('test'))); // $ExpectType Observable<string | number>
51-
});
1+
import { of, asyncScheduler } from 'rxjs';
2+
import { expand } from 'rxjs/operators';
3+
4+
it('should infer correctly', () => {
5+
const o = of(1, 2, 3).pipe(expand(value => of(value))); // $ExpectType Observable<number>
6+
const p = of(1, 2, 3).pipe(expand(value => [value])); // $ExpectType Observable<number>
7+
const q = of(1, 2, 3).pipe(expand(value => Promise.resolve(value))); // $ExpectType Observable<number>
8+
});
9+
10+
it('should infer correctly with a different type as the source', () => {
11+
const o = of(1, 2, 3).pipe(expand(value => of('foo'))); // $ExpectType Observable<string>
12+
const p = of(1, 2, 3).pipe(expand(value => ['foo'])); // $ExpectType Observable<string>
13+
const q = of(1, 2, 3).pipe(expand(value => Promise.resolve('foo'))); // $ExpectType Observable<string>
14+
});
15+
16+
it('should support a project function with index', () => {
17+
const o = of(1, 2, 3).pipe(expand((value, index) => of(index))); // $ExpectType Observable<number>
18+
});
19+
20+
it('should support concurrent parameter', () => {
21+
const o = of(1, 2, 3).pipe(expand(value => of(1), 47)); // $ExpectType Observable<number>
22+
});
23+
24+
it('should enforce types', () => {
25+
const o = of(1, 2, 3).pipe(expand()); // $ExpectError
26+
});
27+
28+
it('should enforce project types', () => {
29+
const o = of(1, 2, 3).pipe(expand((value: string, index) => of(1))); // $ExpectError
30+
const p = of(1, 2, 3).pipe(expand((value, index: string) => of(1))); // $ExpectError
31+
});
32+
33+
it('should enforce project return type', () => {
34+
const o = of(1, 2, 3).pipe(expand(value => 1)); // $ExpectError
35+
});
36+
37+
it('should enforce concurrent type', () => {
38+
const o = of(1, 2, 3).pipe(expand(value => of(1), 'foo')); // $ExpectError
39+
});
40+
41+
it('should enforce scheduler type', () => {
42+
const o = of(1, 2, 3).pipe(expand(value => of(1), 47, 'foo')); // $ExpectError
43+
});
44+
45+
it('should support union types', () => {
46+
const o = of(1).pipe(expand(x => typeof x === 'string' ? of(123) : of('test'))); // $ExpectType Observable<string | number>
47+
});

packages/rxjs/src/internal/operators/every.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export function every<T>(predicate: (value: T, index: number) => boolean): Opera
2525
* ```
2626
*
2727
* @param predicate A function for determining if an item meets a specified condition.
28-
* @param thisArg Optional object to use for `this` in the callback.
2928
* @return A function that returns an Observable of booleans that determines if
3029
* all items of the source Observable meet the condition specified.
3130
*/

packages/rxjs/src/internal/operators/expand.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ export function expand<T, O extends ObservableInput<unknown>>(
5050
* or the output Observable, returns an Observable.
5151
* @param concurrent Maximum number of input Observables being subscribed to
5252
* concurrently.
53-
* @param scheduler The {@link SchedulerLike} to use for subscribing to
54-
* each projected inner Observable.
5553
* @return A function that returns an Observable that emits the source values
5654
* and also result of applying the projection function to each value emitted on
5755
* the output Observable and merging the results of the Observables obtained

0 commit comments

Comments
 (0)