File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/try-catch-tuple/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,20 @@ type DataErrorTuple<T, E> = Branded<
77 DisableArrayMethods < [ data : T , error : E ] & never [ ] >
88> ;
99
10- type Success < T > = DataErrorTuple < T , null > ;
11- type Failure < E extends Error > = DataErrorTuple < null , E | Error > ;
12- type Result < T , E extends Error > = Success < T > | Failure < E > ;
10+ export type Success < T > = DataErrorTuple < T , null > ;
11+ export type Failure < E extends Error > = DataErrorTuple < null , E | Error > ;
12+ export type Result < T , E extends Error > = Success < T > | Failure < E > ;
1313
14- type TryCatchResult < T , E extends Error > = T extends Promise < infer U >
14+ export type TryCatchResult < T , E extends Error > = T extends Promise < infer U >
1515 ? Promise < Result < U , E > >
1616 : Result < T , E > ;
1717
18- type TryCatchFunc < E_ extends Error = Error > = < T , E extends Error = E_ > (
18+ export type TryCatchFunc < E_ extends Error = Error > = < T , E extends Error = E_ > (
1919 fn : T | ( ( ) => T ) ,
2020 operationName ?: string ,
2121) => TryCatchResult < T , E > ;
2222
23- type TryCatch <
23+ export type TryCatch <
2424 F extends TryCatchFunc = TryCatchFunc ,
2525 E_ extends Error = Error ,
2626> = F & {
You can’t perform that action at this time.
0 commit comments