|
| 1 | +diff --git a/dist/types/internal/operators/filter.d.ts b/dist/types/internal/operators/filter.d.ts |
| 2 | +index 01089a216c3214a5d2db80d6ce3867212d6278e4..ccc6db28c58f78e2d6c4699c70c3dbfc42863cac 100644 |
| 3 | +--- a/dist/types/internal/operators/filter.d.ts |
| 4 | ++++ b/dist/types/internal/operators/filter.d.ts |
| 5 | +@@ -5,5 +5,5 @@ export declare function filter<T, S extends T>(predicate: (value: T, index: numb |
| 6 | + export declare function filter<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>; |
| 7 | + /** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ |
| 8 | + export declare function filter<T, A>(predicate: (this: A, value: T, index: number) => boolean, thisArg: A): MonoTypeOperatorFunction<T>; |
| 9 | +-export declare function filter<T>(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction<T>; |
| 10 | ++export declare function filter<T>(predicate: (value: T, index: number) => unknown): MonoTypeOperatorFunction<T>; |
| 11 | + //# sourceMappingURL=filter.d.ts.map |
| 12 | +\ No newline at end of file |
| 13 | +diff --git a/src/internal/operators/filter.ts b/src/internal/operators/filter.ts |
| 14 | +index 4c99edfdcacab7fcbd563fe9634ef6beeeae0a71..9aaf2262c9fa71c9d8e86ee07bfec2d4889973a7 100644 |
| 15 | +--- a/src/internal/operators/filter.ts |
| 16 | ++++ b/src/internal/operators/filter.ts |
| 17 | +@@ -7,7 +7,7 @@ export function filter<T, S extends T>(predicate: (value: T, index: number) => v |
| 18 | + export function filter<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>; |
| 19 | + /** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ |
| 20 | + export function filter<T, A>(predicate: (this: A, value: T, index: number) => boolean, thisArg: A): MonoTypeOperatorFunction<T>; |
| 21 | +-export function filter<T>(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction<T>; |
| 22 | ++export function filter<T>(predicate: (value: T, index: number) => unknown): MonoTypeOperatorFunction<T>; |
| 23 | + |
| 24 | + /** |
| 25 | + * Filter items emitted by the source Observable by only emitting those that |
| 26 | +@@ -57,7 +57,7 @@ export function filter<T>(predicate: (value: T, index: number) => boolean): Mono |
| 27 | + * @return A function that returns an Observable that emits items from the |
| 28 | + * source Observable that satisfy the specified `predicate`. |
| 29 | + */ |
| 30 | +-export function filter<T>(predicate: (value: T, index: number) => boolean, thisArg?: any): MonoTypeOperatorFunction<T> { |
| 31 | ++export function filter<T>(predicate: (value: T, index: number) => unknown, thisArg?: any): MonoTypeOperatorFunction<T> { |
| 32 | + return (source) => |
| 33 | + new Observable((destination) => { |
| 34 | + // An index passed to our predicate function on each call. |
0 commit comments