Merge pull request #17120 from Errorific/master

Update ramda find functions to reflect returning undefined
This commit is contained in:
Daniel Rosenwasser
2017-06-15 00:24:46 -07:00
committed by GitHub

View File

@@ -587,8 +587,8 @@ declare namespace R {
* Returns the first element of the list which matches the predicate, or `undefined` if no
* element matches.
*/
find<T>(fn: (a: T) => boolean, list: T[]): T;
find<T>(fn: (a: T) => boolean): (list: T[]) => T;
find<T>(fn: (a: T) => boolean, list: T[]): T | undefined;
find<T>(fn: (a: T) => boolean): (list: T[]) => T | undefined;
/**
@@ -602,8 +602,8 @@ declare namespace R {
* Returns the last element of the list which matches the predicate, or `undefined` if no
* element matches.
*/
findLast<T>(fn: (a: T) => boolean, list: T[]): T;
findLast<T>(fn: (a: T) => boolean): (list: T[]) => T;
findLast<T>(fn: (a: T) => boolean, list: T[]): T | undefined;
findLast<T>(fn: (a: T) => boolean): (list: T[]) => T | undefined;
/**
* Returns the index of the last element of the list which matches the predicate, or