mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-21 11:51:47 +08:00
added termial operations of Optional
This commit is contained in:
1 parent
09899c1ffa
commit
aad6b603af
1 file changed
+5
-1
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