-
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7100817
commit eab3dbf
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
"effect": major | ||
--- | ||
|
||
## Major: Swap type parameters for `Left` and `Right` to align with `Either` | ||
|
||
**WHAT the breaking change is:** | ||
|
||
- The type parameters for `Left<L, R>` and `Right<L, R>` have been swapped to `Left<R, L>` and `Right<R, L>`, respectively. This brings them in line with the parameter ordering of `Either<R, L>`. | ||
|
||
**WHY the change was made:** | ||
|
||
- This change ensures consistency across the codebase. In `Either<R, L>`, `R` is used for the "right" value and `L` for the "left" value. Aligning `Left` and `Right` with `Either` reduces confusion. | ||
|
||
**HOW a consumer should update their code:** | ||
|
||
- Any usage of `Left<L, R>` should be replaced with `Left<R, L>`. | ||
- Any usage of `Right<L, R>` should be replaced with `Right<R, L>`. | ||
- For example: | ||
- `Left<string, number>` should now be `Left<number, string>`. | ||
- `Right<string, number>` should now be `Right<number, string>`. |