Skip to content

Commit

Permalink
Revert "chore: deprecate source parameters"
Browse files Browse the repository at this point in the history
This reverts commit 8bb2f84.
Closes ReactiveX#6143.
  • Loading branch information
cartant committed May 6, 2021
1 parent 8bb2f84 commit aec4c88
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
2 changes: 0 additions & 2 deletions src/internal/operators/every.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export function every<T, A>(
predicate: (this: A, value: T, index: number, source: Observable<T>) => boolean,
thisArg: A
): OperatorFunction<T, boolean>;
export function every<T>(predicate: (value: T, index: number) => boolean): OperatorFunction<T, boolean>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function every<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, boolean>;

/**
Expand Down
5 changes: 0 additions & 5 deletions src/internal/operators/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export function find<T, S extends T, A>(
predicate: (this: A, value: T, index: number, source: Observable<T>) => value is S,
thisArg: A
): OperatorFunction<T, S | undefined>;
export function find<T, S extends T>(predicate: (value: T, index: number) => value is S): OperatorFunction<T, S | undefined>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function find<T, S extends T>(
predicate: (value: T, index: number, source: Observable<T>) => value is S
): OperatorFunction<T, S | undefined>;
Expand All @@ -20,10 +18,7 @@ export function find<T, A>(
predicate: (this: A, value: T, index: number, source: Observable<T>) => boolean,
thisArg: A
): OperatorFunction<T, T | undefined>;
export function find<T>(predicate: (value: T, index: number) => boolean): OperatorFunction<T, T | undefined>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function find<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, T | undefined>;

/**
* Emits only the first value emitted by the source Observable that meets some
* condition.
Expand Down
2 changes: 0 additions & 2 deletions src/internal/operators/findIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export function findIndex<T, A>(
predicate: (this: A, value: T, index: number, source: Observable<T>) => boolean,
thisArg: A
): OperatorFunction<T, number>;
export function findIndex<T>(predicate: (value: T, index: number) => boolean): OperatorFunction<T, number>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function findIndex<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, number>;

/**
Expand Down
6 changes: 0 additions & 6 deletions src/internal/operators/first.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ import { identity } from '../util/identity';
export function first<T, D = T>(predicate?: null, defaultValue?: D): OperatorFunction<T, T | D>;
export function first<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
export function first<T, D>(predicate: BooleanConstructor, defaultValue: D): OperatorFunction<T, TruthyTypesOf<T> | D>;
export function first<T, S extends T>(predicate: (value: T, index: number) => value is S, defaultValue?: S): OperatorFunction<T, S>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function first<T, S extends T>(
predicate: (value: T, index: number, source: Observable<T>) => value is S,
defaultValue?: S
): OperatorFunction<T, S>;
export function first<T, S extends T, D>(predicate: (value: T, index: number) => value is S, defaultValue: D): OperatorFunction<T, S | D>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function first<T, S extends T, D>(
predicate: (value: T, index: number, source: Observable<T>) => value is S,
defaultValue: D
): OperatorFunction<T, S | D>;
export function first<T, D = T>(predicate: (value: T, index: number) => boolean, defaultValue?: D): OperatorFunction<T, T | D>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function first<T, D = T>(
predicate: (value: T, index: number, source: Observable<T>) => boolean,
defaultValue?: D
Expand Down
4 changes: 0 additions & 4 deletions src/internal/operators/last.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ import { identity } from '../util/identity';
export function last<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
export function last<T, D>(predicate: BooleanConstructor, defaultValue: D): OperatorFunction<T, TruthyTypesOf<T> | D>;
export function last<T, D = T>(predicate?: null, defaultValue?: D): OperatorFunction<T, T | D>;
export function last<T, S extends T>(predicate: (value: T, index: number) => value is S, defaultValue?: S): OperatorFunction<T, S>;
export function last<T, D = T>(predicate: (value: T, index: number) => boolean, defaultValue?: D): OperatorFunction<T, T | D>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function last<T, S extends T>(
predicate: (value: T, index: number, source: Observable<T>) => value is S,
defaultValue?: S
): OperatorFunction<T, S>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function last<T, D = T>(
predicate: (value: T, index: number, source: Observable<T>) => boolean,
defaultValue?: D
Expand Down
2 changes: 0 additions & 2 deletions src/internal/operators/single.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { operate } from '../util/lift';
import { OperatorSubscriber } from './OperatorSubscriber';

export function single<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
export function single<T>(predicate?: (value: T, index: number) => boolean): MonoTypeOperatorFunction<T>;
/** @deprecated Use a closure instead of a `source` parameter. Support for predicates taking a `source` parameter will be removed in v8. */
export function single<T>(predicate?: (value: T, index: number, source: Observable<T>) => boolean): MonoTypeOperatorFunction<T>;

/**
Expand Down

0 comments on commit aec4c88

Please sign in to comment.