Home > @skunkteam/types > BaseTypeImpl > check
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;
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()