Code0 LogoCodeZero

RuntimeFunctionManager

Stores registered runtime function implementations

RuntimeFunctionManager stores all runtime function definitions registered via action.registerRuntimeFunction(). It extends BaseManager with key type string (runtimeName) and value type RuntimeFunctionProps.

action.runtimeFunctions.get('fibonacci_runtime');
action.runtimeFunctions.values();

Interfaces

RuntimeFunctionRunnable

The interface implemented by all RuntimeFunction classes.

interface RuntimeFunctionRunnable {
  run(...args: (PlainValue | undefined)[]): Promise<PlainValue> | PlainValue;
}

The first argument to run() is always a FunctionContext object. Subsequent arguments correspond to the declared parameters in order.

RuntimeFunctionProps

The descriptor stored for each registered runtime function.

interface RuntimeFunctionProps {
  runtimeName: string;
  parameters?: FunctionParameterProps[];
  signature: string;
  throwsError?: boolean;
  name?: Translation[];
  description?: Translation[];
  documentation?: Translation[];
  deprecationMessage?: Translation[];
  displayMessage?: Translation[];
  alias?: Translation[];
  displayIcon?: string;
  design?: string;
  handler: (...args: (PlainValue | undefined)[]) => Promise<PlainValue> | PlainValue;
}

Prop

Type

FunctionContext

Passed as the first argument to every run() call.

interface FunctionContext {
  projectId: number | bigint;
  executionId: string;
  matchedConfig: ProjectConfiguration;
}

Prop

Type

On this page