vue-qs / inferParserType
Type Alias: inferParserType<Input>
inferParserType<
Input> =Inputextendsobject?D:Inputextendsobject?R:InputextendsRecord<string,unknown> ?{ [K in keyof Input]: inferParserType<Input[K]> }:never
Defined in: parsers.ts:88
Infers the state type of a parser, or of an object of parsers.
Type Parameters
Input
Input
Example
ts
const parsers = { page: parseAsInteger.withDefault(1), q: parseAsString }
type State = inferParserType<typeof parsers> // { page: number; q: string | null }