mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 03:31:47 +00:00
Add type alias for boolean | null | undefined
This commit is contained in:
Vendored
+12
-11
@@ -4321,7 +4321,7 @@ declare namespace _ {
|
||||
*/
|
||||
filter(
|
||||
collection: string | null | undefined,
|
||||
predicate?: StringIterator<boolean | null | undefined>
|
||||
predicate?: StringIterator<Boolish>
|
||||
): string[];
|
||||
|
||||
/**
|
||||
@@ -4363,7 +4363,7 @@ declare namespace _ {
|
||||
*/
|
||||
filter(
|
||||
this: LoDashImplicitWrapper<string | null | undefined>,
|
||||
predicate?: StringIterator<boolean | null | undefined>
|
||||
predicate?: StringIterator<Boolish>
|
||||
): LoDashImplicitWrapper<string[]>;
|
||||
|
||||
/**
|
||||
@@ -4405,7 +4405,7 @@ declare namespace _ {
|
||||
*/
|
||||
filter(
|
||||
this: LoDashExplicitWrapper<string | null | undefined>,
|
||||
predicate?: StringIterator<boolean | null | undefined>
|
||||
predicate?: StringIterator<Boolish>
|
||||
): LoDashExplicitWrapper<string[]>;
|
||||
|
||||
/**
|
||||
@@ -6458,7 +6458,7 @@ declare namespace _ {
|
||||
*/
|
||||
reject(
|
||||
collection: string | null | undefined,
|
||||
predicate?: StringIterator<boolean | null | undefined>
|
||||
predicate?: StringIterator<Boolish>
|
||||
): string[];
|
||||
|
||||
/**
|
||||
@@ -6484,7 +6484,7 @@ declare namespace _ {
|
||||
*/
|
||||
reject(
|
||||
this: LoDashImplicitWrapper<string | null | undefined>,
|
||||
predicate?: StringIterator<boolean | null | undefined>
|
||||
predicate?: StringIterator<Boolish>
|
||||
): LoDashImplicitWrapper<string[]>;
|
||||
|
||||
/**
|
||||
@@ -6510,7 +6510,7 @@ declare namespace _ {
|
||||
*/
|
||||
reject(
|
||||
this: LoDashExplicitWrapper<string | null | undefined>,
|
||||
predicate?: StringIterator<boolean | null | undefined>
|
||||
predicate?: StringIterator<Boolish>
|
||||
): LoDashExplicitWrapper<string[]>;
|
||||
|
||||
/**
|
||||
@@ -16590,16 +16590,17 @@ declare namespace _ {
|
||||
}
|
||||
|
||||
type NotVoid = {} | null | undefined;
|
||||
type Boolish = boolean | null | undefined;
|
||||
type ArrayIterator<T, TResult> = (value: T, index: number, collection: T[]) => TResult;
|
||||
type ListIterator<T, TResult> = (value: T, index: number, collection: List<T>) => TResult;
|
||||
type ListIteratee<T> = ListIterator<T, NotVoid> | string | [string, any] | PartialDeep<T>;
|
||||
type ListIterateeBoolean<T> = ListIterator<T, boolean | null | undefined> | string | [string, any] | PartialDeep<T>;
|
||||
type ListIterateeBoolean<T> = ListIterator<T, Boolish> | string | [string, any] | PartialDeep<T>;
|
||||
type ListIteratorTypeGuard<T, S extends T> = (value: T, index: number, collection: List<T>) => value is S;
|
||||
|
||||
// Note: key should be string, not keyof T, because the actual object may contain extra properties that were not specified in the type.
|
||||
type ObjectIterator<TObject, TResult> = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult;
|
||||
type ObjectIteratee<TObject> = ObjectIterator<TObject, NotVoid> | string | [string, any] | PartialDeep<TObject[keyof TObject]>;
|
||||
type ObjectIterateeBoolean<TObject> = ObjectIterator<TObject, boolean | null | undefined> | string | [string, any] | PartialDeep<TObject[keyof TObject]>;
|
||||
type ObjectIterateeBoolean<TObject> = ObjectIterator<TObject, Boolish> | string | [string, any] | PartialDeep<TObject[keyof TObject]>;
|
||||
type ObjectIteratorTypeGuard<TObject, S extends TObject[keyof TObject]> = (value: TObject[keyof TObject], key: string, collection: TObject) => value is S;
|
||||
|
||||
type DictionaryIterator<T, TResult> = ObjectIterator<Dictionary<T>, TResult>;
|
||||
@@ -16608,7 +16609,7 @@ declare namespace _ {
|
||||
|
||||
type NumericDictionaryIterator<T, TResult> = (value: T, key: number, collection: NumericDictionary<T>) => TResult;
|
||||
type NumericDictionaryIteratee<T> = NumericDictionaryIterator<T, NotVoid> | string | [string, any] | PartialDeep<T>;
|
||||
type NumericDictionaryIterateeBoolean<T> = NumericDictionaryIterator<T, boolean | null | undefined> | string | [string, any] | PartialDeep<T>;
|
||||
type NumericDictionaryIterateeBoolean<T> = NumericDictionaryIterator<T, Boolish> | string | [string, any] | PartialDeep<T>;
|
||||
|
||||
type StringIterator<TResult> = (char: string, index: number, string: string) => TResult;
|
||||
|
||||
@@ -16624,8 +16625,8 @@ declare namespace _ {
|
||||
|
||||
type ValueIteratee<T> = ((value: T) => NotVoid) | string | [string, any] | PartialDeep<T>;
|
||||
type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | string | [string, any] | PartialDeep<T>;
|
||||
type Comparator<T> = (a: T, b: T) => boolean | null | undefined;
|
||||
type Comparator2<T1, T2> = (a: T1, b: T2) => boolean | null | undefined;
|
||||
type Comparator<T> = (a: T, b: T) => Boolish;
|
||||
type Comparator2<T1, T2> = (a: T1, b: T2) => Boolish;
|
||||
|
||||
type PropertyName = string | number;
|
||||
type PropertyPath = Many<PropertyName>;
|
||||
|
||||
Reference in New Issue
Block a user