Skip to content

Type Alias: ParserOptions<T> ​

ts
type ParserOptions<T> = object;

Defined in: parser/parsers.ts:8

The options of defineParser.

Type Parameters ​

Type Parameter
T

Properties ​

parse ​

ts
parse: (raw) => T | null;

Defined in: parser/parsers.ts:13

Turns the string into a value, or returns null for a string it does not accept. That null stays the answer of the parser, whatever the missing value of the app is.

Parameters ​

ParameterType
rawstring

Returns ​

T | null


serialize? ​

ts
serialize?: (value) => string;

Defined in: parser/parsers.ts:15

Turns a value into the string the source holds.

Parameters ​

ParameterType
valueT

Returns ​

string

Default Value ​

String

Released under the MIT License.