Created
April 13, 2022 17:04
-
-
Save abraithwaite/a3c2d88d0ec6b983960d14738184bc37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Result<T> { | |
success: true | |
data: T | |
} | |
export interface InternalError { | |
success: false | |
user: false | |
error: string | |
} | |
export interface UserError { | |
success: false | |
user: true | |
error: string | |
} | |
export type Error = InternalError | UserError | |
export type ResultOrError<T> = Result<T> | Error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment