vue-qs / ParserBuilder
Type Alias: ParserBuilder<T, K>
Defined in: parsers.ts:35
A parser with chainable builder methods. Created by createParser or one of the built-in parseAs* parsers.
Type Declaration
withOptions()
withOptions<
This>(this,options):This
Returns a copy of the parser with the given URL update options
Type Parameters
This
This
Parameters
this
This
options
Returns
This
withDefault()
withDefault(
this,defaultValue):ParserBuilderWithDefault<T,K>
Returns a copy of the parser that falls back to defaultValue when the key is missing or invalid
Parameters
this
ParserBuilder<T, K>
defaultValue
NonNullable<T>
Returns
ParserBuilderWithDefault<T, K>
parseServerSide()
parseServerSide(
value):T|null
Parses a raw value outside of Vue, e.g. on the server
Parameters
value
string | readonly string[] | null | undefined
Returns
T | null
Type Parameters
T
T
K
K extends ParserType = "single"