literal

View Source

Summary

Create a schema that accepts a single literal value using strict equality (===).

Signature

function literal<value>(literalValue: value): Schema<unknown, value>;

Params

literalValue

The literal value to match

Returns

A schema that produces the literal type