CHAN.RUN

ensure

InferFaultErrors

Extract the error union from a declared function's error classes. Maps [typeof NotFoundError, typeof DbError] → NotFoundError | DbError.

InferFaultErrors<TErrors>

type InferFaultErrors<TErrors> = InstanceType<TErrors[number]>;

Defined in: src/types.ts

Extract the error union from a declared function's error classes. Maps [typeof NotFoundError, typeof DbError] → NotFoundError | DbError.

Type Parameters

Type Parameter
TErrors extends NamedFaultErrorClass<string>[]