mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-06 16:20:26 +08:00
added termial operations of Optional
This commit is contained in:
Vendored
+5
-1
@@ -11,7 +11,7 @@ declare class Stream<T> {
|
||||
static generate <T> (supplier: () => T): Stream<T>;
|
||||
// static empty<T>(): Stream<T>;
|
||||
|
||||
anyMatch(predicate: (elem: T) => boolean): boolean;
|
||||
anyMatch(predicate: Stream.Predicate): boolean;
|
||||
anyMatch(regexp: RegExp): boolean;
|
||||
allMatch(predicate: (elem: T) => boolean): boolean;
|
||||
allMatch(regexp: RegExp): boolean;
|
||||
@@ -73,6 +73,10 @@ declare class Stream<T> {
|
||||
|
||||
declare module Stream {
|
||||
|
||||
export interface Predicate<T> {
|
||||
(elem: T): boolean;
|
||||
}
|
||||
|
||||
export interface Iterator<T> {
|
||||
next(): T;
|
||||
done: boolean;
|
||||
|
||||
Reference in New Issue
Block a user