Skip to content

Commit 09faf35

Browse files
committed
Add changeset
1 parent e23d126 commit 09faf35

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.changeset/empty-poets-collect.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'neverthrow': major
3+
---
4+
5+
Allow orElse method to change ok types.
6+
This makes the orElse types match the implementation.
7+
8+
This is a breaking change for the orElse type argument list,
9+
as the ok type must now be provided before the err type.
10+
11+
```diff
12+
- result.orElse<ErrType>(foo)
13+
+ result.orElse<OkType, ErrType>(foo)
14+
```
15+
16+
This only applies if type arguments were
17+
explicitly provided at an orElse callsite.
18+
If the type arguments were inferred,
19+
no updates are needed during the upgrade.

0 commit comments

Comments
 (0)