Skip to content

Function: makeEmptyFormula()

makeEmptyFormula<ParamDefsT>(definition): object & object

Defined in: api.ts:2935

Creates the definition of an "empty" formula, that is, a formula that uses a RequestHandlerTemplate to define an implementation for the formula rather than implementing an actual execute function in JavaScript.

Example

coda.makeEmptyFormula({
   name: "GetWidget",
   description: "Gets a widget.",
   request: {
     url: "https://example.com/widgets/{id}",
     method: "GET",
   },
   parameters: [
     coda.makeParameter({type: coda.ParameterType.Number, name: "id", description: "The ID of the widget to get."}),
   ],
 }),

Type Parameters

Type Parameter
ParamDefsT extends ParamDefs

Parameters

Parameter Type
definition FormulaOptions<ParamDefsT, EmptyFormulaDef<ParamDefsT>>

Returns