custom-functions-runtime package

Classes

CustomFunctions.Error

Use this class to handle errors and write custom error messages.

Interfaces

CustomFunctions.CancelableInvocation

Provides information about the invocation of a cancelable custom function. A cancelable custom function can provide a handler for the onCanceled event.

To indicate that a function is cancelable, in the metadata JSON file, the function options should specify: { "cancelable": true }

If the metadata JSON file is being generated from JSDoc comments, include the tag @cancelable.

CustomFunctions.Invocation

Provides information about the invocation of a custom function.

CustomFunctions.StreamingInvocation

Provides information about the invocation of a streaming custom function. A streaming custom function can provide results which can change over time.

Call setResult() one or more times to provide the result instead of returning a result from the function.

Enums

CustomFunctions.ErrorCode

Error codes for custom functions. The error codes will appear in the cell that invoked the function.

Custom error messages appear in addition to these error codes. Custom messages display in the error indicator menu, which is accessed by hovering over the error flag on each cell with an error.

Functions

CustomFunctions.associate(id, functionObject)

Associates the JavaScript function to the name given by the "id" property in the metadata JSON file.

CustomFunctions.associate(mappings)

Associates the JavaScript functions to the names given by the "id" properties in the metadata JSON file.

Function Details

CustomFunctions.associate(id, functionObject)

Associates the JavaScript function to the name given by the "id" property in the metadata JSON file.

export function associate(id: string, functionObject: Function): void;

Parameters

id

string

functionObject

Function

Returns

void

CustomFunctions.associate(mappings)

Associates the JavaScript functions to the names given by the "id" properties in the metadata JSON file.

export function associate(mappings: { [key: string]: Function }): void;

Parameters

mappings

{ [key: string]: Function }

Returns

void