Skip to content

vue-qs v0.2.8


vue-qs / ParserBuilder

Type Alias: ParserBuilder<T, K> ​

ParserBuilder<T, K> = Parser<T, K> & Options & object

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 ​

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"

Released under the MIT License. Questions or ideas? Join the GitHub Discussions.