variable / @typed/router/AST

path

Constructs a Route AST node from one Path AST atom.

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

Import

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

Signatures

export declare const path: (path: PathAst) => RouteAst.Path;

Why

Path syntax can participate in route joins and schema transformations without reparsing strings.

Ownership and lifetime

path returns a fresh plain AST node immediately and retains any supplied child nodes or arrays by reference; it acquires no external resource.

Source