type-alias / @typed/router/AST

PathAst.QueryParams

A collection of declared query-parameter AST nodes.

Package version
1.0.0-beta.7
Category
Path syntax
Since
1.0.0
Member of
PathAst

Import

import { PathAst } from "@typed/router/AST";

Access PathAst.QueryParams through the imported PathAst export. Its declaration below describes the member.

Signatures

type QueryParams = {
    type: "query-params";
    value: ReadonlyArray<PathAst.QueryParam>;
};

Why

Only declared query keys participate in matching and decoding; undeclared keys are ignored.

Ownership and lifetime

QueryParams describes plain readonly AST data. Routes and Matchers retain the concrete nodes they receive by reference; the type itself owns no resource.

Property: type

Discriminates the query-declaration collection.

Property: type: Why

Query parsing begins only for explicitly declared query nodes.

Property: type: Ownership and lifetime

The literal tag is retained with this plain node and owns no URL state.

Property: value

Query declarations in source order.

Property: value: Why

Formatting and schema-field derivation preserve declaration order.

Property: value: Ownership and lifetime

The node retains the supplied readonly array by reference; callers must not mutate it after constructing the AST.

Source