Skip to content

Function: parseAsNumberLiteral() ​

ts
function parseAsNumberLiteral<T>(values): Parser<T[number]>;

Defined in: parser/parsers.ts:173

Accepts only the numbers listed, and reads them as their union.

Type Parameters ​

Type Parameter
T extends readonly number[]

Parameters ​

ParameterType
valuesT

Returns ​

Parser<T[number]>

Released under the MIT License.