UNPKG

257 BTypeScriptView Raw
1export declare function single<T, S extends T>(source: Iterable<T>, predicate: (value: T, index: number) => value is S): S | undefined;
2export declare function single<T>(source: Iterable<T>, predicate?: (value: T, index: number) => boolean): T | undefined;