added termial operations of Optional

This commit is contained in:
Bence Eros
2015-06-14 00:39:46 +02:00
parent 09899c1ffa
commit aad6b603af
+5 -1
View File
@@ -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;