export type Error = { type: Kind; source: Source; params: Params; message?: `Ruh Roh! ${Message}\n\nLoser.`; }; type ErrorKind = 'INVALID_TYPE_ARG' | 'NEVER_CONDITION'; export type InvalidTypeArg = Error<'INVALID_TYPE_ARG', Source, Params, Message>; export type AssertNever = Error<'NEVER_CONDITION', Source, Params, Message>;