Skip to content

Instantly share code, notes, and snippets.

@meheleventyone
Created January 15, 2020 18:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meheleventyone/b7b504052c589829885fe42f7db9ba14 to your computer and use it in GitHub Desktop.
Save meheleventyone/b7b504052c589829885fe42f7db9ba14 to your computer and use it in GitHub Desktop.
interface Value<T> {
kind: "value";
value: T;
}
interface Error<T> {
kind: "error";
error: T;
}
export type Result<T, E> = Value<T> | Error<E>;
export type Optional<T> = T | undefined;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment