Skip to content
Shapemetry

Model - Function registry

API reference for src/schema/functionRegistry on @huukhanhnguyen/model, reachable from ./nodes.

See the Guide for the ModelJSON / evaluate pipeline.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

FunctionArgEntry

type

Function Registry — raw catalog data for PascalCase namespace functions (Point, Vector, NurbsCurve, …) available inside expressions. Type-checked via satisfies FunctionRegistryEntry[]. Replaces schema/functions.json — same data, TypeScript-native.

type FunctionArgEntry
// = {
    type: string;
    desc: string;
}

FunctionRegistryEntry

type

type FunctionRegistryEntry
// = {
    namespace: string;
    method: string;
    label: string;
    args: Record<string, FunctionArgEntry>;
    returns: string;
    tooltip: string;
    /** Injected per evaluation (closes over model state) instead of being
     *  bound from a compute module — see functionRegistry/wiring.ts, which
     *  skips these, and nodes/ExpressionNode.ts's `_buildContext`, which
     *  supplies them. Declared here so the catalog stays the WHOLE
     *  expression surface for docs / the AI grammar / autocomplete. */
    runtime?: true;
}
Last updated: 📖 1 min readEdit on GitHub