Skip to content

Commit 307069f

Browse files
committed
Avoid need to cast
1 parent 2a813fd commit 307069f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/webapp/ui/src/util/optional.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class Optional<T> {
106106

107107
// altValueGetter doesn't have to return a value; it could throw an exception
108108
orElseGet<U>(altValueGetter: () => U): T | U {
109-
return this.destruct(altValueGetter, (value) => value as T | U);
109+
return this.destruct<T | U>(altValueGetter, (value) => value);
110110
}
111111

112112
/*

0 commit comments

Comments
 (0)