mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
added termial operations of Optional
This commit is contained in:
Vendored
+6
@@ -102,5 +102,11 @@ declare module Stream {
|
||||
filter(predicate: (elem: T) => boolean): Optional<T>;
|
||||
map<U>(mapper: (elem: T) => U): Optional<U>;
|
||||
flatMap<U>(mapper: (elem: T) => Stream.Optional<U>): Optional<U>;
|
||||
isPresent(): boolean;
|
||||
get(): T;
|
||||
ifPresent(consumer: (elem: T) => void): void;
|
||||
orElse(other: T): T;
|
||||
orElseGet(supplier: () => T): T;
|
||||
orElseThrow(error: any): T;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user