Import
import { RouteAst } from "@typed/router/AST";Signatures
export type RouteAst = RouteAst.Path | RouteAst.Transform | RouteAst.Join;export declare namespace RouteAst {
interface Path {
type: "path";
path: PathAst;
}
interface Transform {
type: "transform";
from: RouteAst;
to: Top;
transformation: Transformation<any, any, any, any>;
}
interface Join {
type: "join";
parts: ReadonlyArray<RouteAst>;
}
}Why
Route composition preserves transformations instead of flattening them into an untyped string.
Ownership and lifetime
RouteAst describes plain readonly AST data. Routes and Matchers retain the concrete nodes they receive by reference; the type itself owns no resource.
Members
RouteAst.JoinA Route AST node containing ordered child routes.
RouteAst.PathA Route AST node containing one Path AST atom.
RouteAst.TransformA Route AST node carrying an Effect Schema transformation.