callFn()
ts
function callFn(
fn,
argsSubs?,
scopedVariables?): Promise<unknown>;Defined in: renderer/fns.ts:36
Executes an exposable function and resolves its arguments.
This is the core function execution mechanism of the runtime. It resolves arguments, supports nested function calls, variable access, and optional result assignment.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn | ExposableFn | Function definition to execute |
argsSubs? | Record<number, unknown> | Optional argument overrides (e.g. event injection) |
scopedVariables? | Variables | - |
Returns
Promise<unknown>
Promise resolving to the computed result
Remarks
Argument resolution supports:
- primitive values (string, number, boolean)
- variables (
var) - nested functions (
fn) - argument injection (
arg) - event overrides via
argsSubs
Additional features:
- Access resolution via touchByAccess
- Result assignment via
fn.as - Nested execution with variable injection
Since
1.0.0
Author
Simon Kovtyk
Author
David Schummer