variable / @typed/router/AST

layout

Constructs a Match AST boundary around a parameter-aware layout.

Package version
1.0.0-beta.13
Category
Matcher composition syntax
Since
1.0.0

Import

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

Signatures

export declare const layout: (matches: ReadonlyArray<MatchAst>, layout: LayoutType<any, any, any, any, any, any, any>) => MatchAst.Layout;

Why

Layout ownership and nesting remain explicit in the compiled matcher tree.

Ownership and lifetime

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

Source