From d5dd165f8b9f670f14c2b08d6611968a7c5a27da Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 27 Jan 2026 15:18:50 +0000 Subject: [PATCH] Ensure default value is assignable if we have a `Failure` --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }