mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Merge pull request #28286 from aikoven/fix-wu-find
[wu] Make `wu.find` return `T | undefined`
This commit is contained in:
4
types/wu/index.d.ts
vendored
4
types/wu/index.d.ts
vendored
@@ -30,7 +30,7 @@ declare namespace wu {
|
||||
function enumerate<T>(iter: Iterable<T>): Iterable<[number, T]>;
|
||||
function every<T>(fn: Filter<T>, iter: Iterable<T>): boolean;
|
||||
function filter<T>(fn: Filter<T>, iter: Iterable<T>): WuIterable<T>;
|
||||
function find<T>(fn: Filter<T>, iter: Iterable<T>): T;
|
||||
function find<T>(fn: Filter<T>, iter: Iterable<T>): T | undefined;
|
||||
function flatten(iter: Iterable<any>): WuIterable<any>;
|
||||
function flatten(shallow: boolean, iter: Iterable<any>): WuIterable<any>;
|
||||
function forEach<T>(fn: Consumer<T>, iter: Iterable<T>): void;
|
||||
@@ -79,7 +79,7 @@ declare namespace wu {
|
||||
enumerate(): Iterable<[number, T]>;
|
||||
every(fn: Filter<T>): boolean;
|
||||
filter(fn: Filter<T>): WuIterable<T>;
|
||||
find(fn: Filter<T>): T;
|
||||
find(fn: Filter<T>): T | undefined;
|
||||
flatten(shallow?: boolean): WuIterable<any>;
|
||||
forEach(fn: Consumer<T>): void;
|
||||
has(t: T): boolean;
|
||||
|
||||
Reference in New Issue
Block a user