Skip to content

Validated type

Home > @rimitive/core > Validated

Validate a module: return T if valid, error message if not

Signature:

type Validated<T> = IsInvalid<T> extends true ? ErrorFor<T> : T;

References: IsInvalid, ErrorFor