Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 661 Bytes

types.basetypeimpl.check.md

File metadata and controls

19 lines (11 loc) · 661 Bytes

Home > @skunkteam/types > BaseTypeImpl > check

BaseTypeImpl.check property

Asserts that a value conforms to this Type and returns the input as is, if it does.

Signature:

get check(): (this: void, input: unknown) => ResultType;

Remarks

When given a value that does not conform to the Type, throws an exception.

Note that this does not invoke the parser (including the auto-caster). Use BaseTypeImpl.construct()