@axman/res 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/match.d.ts +7 -0
- package/dist/res.d.ts +3 -3
- package/dist/unwrap.d.ts +2 -0
- package/package.json +1 -1
package/dist/match.d.ts
ADDED
package/dist/res.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type Ok<T> = [T, null];
|
|
2
|
-
export type Err<
|
|
3
|
-
export type Res<T, E> = Ok<T> | Err<E>;
|
|
2
|
+
export type Err<E extends {}> = [null, E];
|
|
3
|
+
export type Res<T, E extends {}> = Ok<T> | Err<E>;
|
|
4
4
|
export declare function ok<T>(value: T): Ok<T>;
|
|
5
|
-
export declare function err<E>(error: E): Err<E>;
|
|
5
|
+
export declare function err<E extends {}>(error: E): Err<E>;
|
package/dist/unwrap.d.ts
ADDED