variable / @typed/router/AST

transform

Constructs a schema-transforming Route AST node.

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

Import

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

Signatures

export declare const transform: (from: RouteAst, to: Top, transformation: Transformation<any, any, any, any>) => RouteAst.Transform;

Why

The encoded route shape and decoded Effect Schema type remain linked.

Ownership and lifetime

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

Source