feat: add better provider support, icons, regen, and a lot more
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
export interface Ok<T> {
|
||||
ok: true;
|
||||
data: T;
|
||||
}
|
||||
|
||||
export const Ok = <T>(data: T): Ok<T> => ({
|
||||
ok: true,
|
||||
data,
|
||||
});
|
||||
|
||||
export interface Err<E> {
|
||||
ok: false;
|
||||
error: E;
|
||||
}
|
||||
|
||||
export const Err = <E>(error: E): Err<E> => ({
|
||||
ok: false,
|
||||
error,
|
||||
});
|
||||
|
||||
export type Result<T, E> = Ok<T> | Err<E>;
|
||||
Reference in New Issue
Block a user