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<
7
7
DisableArrayMethods < [ data : T , error : E ] & never [ ] >
8
8
> ;
9
9
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 > ;
13
13
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 >
15
15
? Promise < Result < U , E > >
16
16
: Result < T , E > ;
17
17
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_ > (
19
19
fn : T | ( ( ) => T ) ,
20
20
operationName ?: string ,
21
21
) => TryCatchResult < T , E > ;
22
22
23
- type TryCatch <
23
+ export type TryCatch <
24
24
F extends TryCatchFunc = TryCatchFunc ,
25
25
E_ extends Error = Error ,
26
26
> = F & {
You can’t perform that action at this time.
0 commit comments