Import
import { MatchAst } from "@typed/router/AST";Signatures
export type MatchAst = MatchAst.Route | MatchAst.Layer | MatchAst.Layout | MatchAst.Prefixed | MatchAst.Catch;export declare namespace MatchAst {
interface Route {
type: "route";
route: RouteAst;
guard: Guard<any, any, any, any>;
handler: MatchHandler<any, any, any, any>;
}
interface Layer {
type: "layer";
matches: ReadonlyArray<MatchAst>;
deps: ReadonlyArray<AnyLayer>;
}
interface Layout {
type: "layout";
matches: ReadonlyArray<MatchAst>;
layout: LayoutType<any, any, any, any, any, any, any>;
}
interface Prefixed {
type: "prefixed";
matches: ReadonlyArray<MatchAst>;
prefix: RouteAst;
}
interface Catch {
type: "catch";
matches: ReadonlyArray<MatchAst>;
f: (cause: RefSubject<Cause<any>>) => Fx<any, any, any>;
}
}Why
Matcher composition remains inspectable before runtime compilation.
Ownership and lifetime
MatchAst describes plain readonly AST data. Routes and Matchers retain the concrete nodes they receive by reference; the type itself owns no resource.
Members
MatchAst.CatchA Match AST node defining a reactive cause boundary.
MatchAst.LayerA Match AST boundary carrying route-local Effect Layers.
MatchAst.LayoutA function that wraps matched content using reactive params.
MatchAst.PrefixedA Match AST node that structurally prefixes nested cases.
MatchAst.RouteA Match AST candidate containing one Route AST, Guard, and output handler.