literal
DDataParser.literal() restricts the input to one or more exact values (string, number, bigint, boolean, null, undefined). Handy for expressing runtime enums without losing TypeScript inference.
Interactive example
Parameters
input: allowed value or array of values (automatically normalized to an array).errorMessage: custom message if the input does not match the whitelist.checkers:checkerRefineto add business logic.
Return value
A DataParserLiteral whose parse returns DEither.success<LiteralUnion> on success, otherwise DEither.error<DataParserError>.
