Skip to content

Commit 9b4eb3e

Browse files
committed
chore: update DataErrorTuple type
This improves: - The `rest` type `[res, err, ...rest]` is now `never[]`. - The `value` type in `tryCatch(...).map((value) => {})` is now `never`.
1 parent 7c3e892 commit 9b4eb3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/try-catch-tuple/src/tryCatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type Branded<T> = T & { __tryCatchTupleResult: never };
22

33
type DataErrorTuple<T, E> = Branded<
4-
[data: T, error: E]
4+
[data: T, error: E] & never[]
55
>;
66

77
type Success<T> = DataErrorTuple<T, null>;

0 commit comments

Comments
 (0)