function / @typed/router/Path

getDecodedParamNames

Returns the decoded field names contributed by one Path AST node.

Package version
1.0.0-beta.13
Category
Route structure validation
Since
1.0.0

Import

import { getDecodedParamNames } from "@typed/router/Path";

Signatures

export declare function getDecodedParamNames(ast: PathAst): ReadonlyArray<string>;

Why

Joined schema transformations can project child inputs and detect collisions.

Ownership and lifetime

getDecodedParamNames traverses the supplied AST immediately and returns a fresh array; child AST and Schema values in that array remain shared references.

Source