Skip to content

Commit 5c990b6

Browse files
committed
chore: export missing types
1 parent db99a2d commit 5c990b6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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 & {

0 commit comments

Comments
 (0)