type-alias / @typed/router/AST

PathAst.Slash

The root slash Route.

Package version
1.0.0-beta.13
Category
Path syntax
Since
1.0.0
Member of
PathAst

Import

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

Access PathAst.Slash through the imported PathAst export. Its declaration below describes the member.

Signatures

type Slash = {
    type: "slash";
};

Why

Root matching remains an explicit route value rather than an empty sentinel.

Ownership and lifetime

Slash describes plain readonly AST data. Routes and Matchers retain the concrete nodes they receive by reference; the type itself owns no resource.

Property: type

Discriminates the explicit root slash node.

Property: type: Why

Root formatting does not depend on an empty or missing AST sentinel.

Property: type: Ownership and lifetime

The literal tag is immutable plain data and acquires no resource.

Source