MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / allParamsNumeric

Function allParamsNumeric

src/compute-engine/boxed-expression/box.ts:569–579  ·  view source on GitHub ↗

* True when every declared parameter of a signature (required, optional and * variadic) is a numeric type (a subtype of `number`). Used to restrict the * post-canonical argument re-validation in `makeCanonicalFunction` to the * pure-numeric operators (`Sin`, `Factorial`, …) whose custom canonical

(signature: Type)

Source from the content-addressed store, hash-verified

567 // returns a fresh instance for a user definition, so it is marked in
568 // place.
569 const symbol = bound as Expression & {
570 _asStructural?: (inPlace: boolean) => Expression;
571 };
572 return symbol._asStructural?.(true) ?? bound;
573 }
574 return ce.symbol(name, { canonical: false, metadata });
575}
576
577/**
578 * The structural binders and lazy calls around the node being boxed,
579 * innermost first. A structural binder makes no scope, so a macro of a name
580 * that one of them binds, or that a lazy call writes at an operand that takes
581 * a name, is hidden by this record, not by the lookup (rule 6 of
582 * `docs/plans/2026-11-12-macro-kind-spec.md`). A node pushes its head and its

Callers 1

makeCanonicalFunctionFunction · 0.85

Calls 2

isSubtypeFunction · 0.90
mapMethod · 0.65

Tested by

no test coverage detected