export interface Left { error: E; isErr(this: Result): this is Left; isOk(this: Result): this is Right; unwrap(): T; map(fn: (value: T) => U): Result; mapError(fn: (error: E) => U): Result; } export interface Right { value: T; isErr(this: Result): this is Left; isOk(this: Result): this is Right; unwrap(): T; map(fn: (value: T) => U): Result; mapError(fn: (error: E) => U): Result; } export type Result = Left | Right;