diff --git a/api_guard/dist/types/operators/index.d.ts b/api_guard/dist/types/operators/index.d.ts index cfff96d807..c11c8e38d9 100644 --- a/api_guard/dist/types/operators/index.d.ts +++ b/api_guard/dist/types/operators/index.d.ts @@ -76,7 +76,8 @@ export declare function endWith(scheduler: SchedulerLike): MonoTypeOperatorFu export declare function endWith(...valuesAndScheduler: [...A, SchedulerLike]): OperatorFunction>; export declare function endWith(...values: A): OperatorFunction>; -export declare function every(predicate: BooleanConstructor, thisArg?: any): OperatorFunction extends never ? false : boolean>; +export declare function every(predicate: BooleanConstructor): OperatorFunction extends never ? false : boolean>; +export declare function every(predicate: BooleanConstructor, thisArg: any): OperatorFunction extends never ? false : boolean>; export declare function every(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; export declare function every(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; @@ -105,7 +106,8 @@ export declare function find(predicate: (value: T, index: number export declare function find(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; export declare function find(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; -export declare function findIndex(predicate: BooleanConstructor, thisArg?: any): OperatorFunction; +export declare function findIndex(predicate: BooleanConstructor): OperatorFunction; +export declare function findIndex(predicate: BooleanConstructor, thisArg: any): OperatorFunction; export declare function findIndex(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; export declare function findIndex(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; diff --git a/src/internal/observable/partition.ts b/src/internal/observable/partition.ts index d617a43803..6e9fee2866 100644 --- a/src/internal/observable/partition.ts +++ b/src/internal/observable/partition.ts @@ -4,6 +4,7 @@ import { ObservableInput } from '../types'; import { Observable } from '../Observable'; import { innerFrom } from './from'; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function partition( source: ObservableInput, predicate: (this: A, value: T, index: number) => value is U, @@ -14,6 +15,7 @@ export function partition( predicate: (value: T, index: number) => value is U ): [Observable, Observable>]; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function partition( source: ObservableInput, predicate: (this: A, value: T, index: number) => boolean, diff --git a/src/internal/operators/every.ts b/src/internal/operators/every.ts index 0d91df0e9a..c7c52d4bcb 100644 --- a/src/internal/operators/every.ts +++ b/src/internal/operators/every.ts @@ -3,10 +3,13 @@ import { Falsy, OperatorFunction } from '../types'; import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; +export function every(predicate: BooleanConstructor): OperatorFunction extends never ? false : boolean>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function every( predicate: BooleanConstructor, - thisArg?: any + thisArg: any ): OperatorFunction extends never ? false : boolean>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function every( predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A diff --git a/src/internal/operators/filter.ts b/src/internal/operators/filter.ts index 16bdcde5c6..420e98f8e1 100644 --- a/src/internal/operators/filter.ts +++ b/src/internal/operators/filter.ts @@ -2,9 +2,11 @@ import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../ty import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function filter(predicate: (this: A, value: T, index: number) => value is S, thisArg: A): OperatorFunction; export function filter(predicate: (value: T, index: number) => value is S): OperatorFunction; export function filter(predicate: BooleanConstructor): OperatorFunction>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function filter(predicate: (this: A, value: T, index: number) => boolean, thisArg: A): MonoTypeOperatorFunction; export function filter(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; diff --git a/src/internal/operators/find.ts b/src/internal/operators/find.ts index c09494574a..2b51163a1f 100644 --- a/src/internal/operators/find.ts +++ b/src/internal/operators/find.ts @@ -5,6 +5,7 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function find(predicate: BooleanConstructor): OperatorFunction>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function find( predicate: (this: A, value: T, index: number, source: Observable) => value is S, thisArg: A @@ -12,6 +13,7 @@ export function find( export function find( predicate: (value: T, index: number, source: Observable) => value is S ): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function find( predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A diff --git a/src/internal/operators/findIndex.ts b/src/internal/operators/findIndex.ts index 7c476c5b0f..52a0f23893 100644 --- a/src/internal/operators/findIndex.ts +++ b/src/internal/operators/findIndex.ts @@ -3,7 +3,10 @@ import { Falsy, OperatorFunction } from '../types'; import { operate } from '../util/lift'; import { createFind } from './find'; -export function findIndex(predicate: BooleanConstructor, thisArg?: any): OperatorFunction; +export function findIndex(predicate: BooleanConstructor): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function findIndex(predicate: BooleanConstructor, thisArg: any): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function findIndex( predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A diff --git a/src/internal/operators/map.ts b/src/internal/operators/map.ts index 6261392007..3e4e513558 100644 --- a/src/internal/operators/map.ts +++ b/src/internal/operators/map.ts @@ -3,6 +3,7 @@ import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; export function map(project: (value: T, index: number) => R): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function map(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction; /**