We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b4eb3e commit db99a2dCopy full SHA for db99a2d
packages/try-catch-tuple/src/tryCatch.ts
@@ -1,7 +1,10 @@
1
type Branded<T> = T & { __tryCatchTupleResult: never };
2
+type DisableArrayMethods<T> = T & {
3
+ [K in Exclude<keyof Array<any>, "length" | symbol>]: never;
4
+};
5
6
type DataErrorTuple<T, E> = Branded<
- [data: T, error: E] & never[]
7
+ DisableArrayMethods<[data: T, error: E] & never[]>
8
>;
9
10
type Success<T> = DataErrorTuple<T, null>;
0 commit comments