diff --git a/src/util.ts b/src/util.ts index 2298acab3..2f2bbf72a 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1328,7 +1328,7 @@ export class Result { } /** Get the value if this is a success, or return the default value if this is a failure. */ - orElse(defaultValue: T): T { + orElse(defaultValue: U): T | U { return this.isSuccess() ? this.value : defaultValue; } }