mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 17:39:15 +00:00
Ensure default value is assignable if we have a Failure
This commit is contained in:
+1
-1
@@ -1328,7 +1328,7 @@ export class Result<T, E> {
|
||||
}
|
||||
|
||||
/** Get the value if this is a success, or return the default value if this is a failure. */
|
||||
orElse(defaultValue: T): T {
|
||||
orElse<U>(defaultValue: U): T | U {
|
||||
return this.isSuccess() ? this.value : defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user