(data: T)
| 2 | export type Result<T, E = string> = { success: true; data: T } | { success: false; error: E }; |
| 3 | |
| 4 | export function Ok<T>(data: T): Result<T, never> { |
| 5 | return { success: true, data }; |
| 6 | } |
| 7 | |
| 8 | export function Err<E>(error: E): Result<never, E> { |
| 9 | return { success: false, error }; |
no outgoing calls