Skip to content

Interface: ParamDef<T>

The definition of a formula parameter.

Type parameters

Name Type
T extends UnionType

Properties

autocomplete

Optional autocomplete: MetadataFormula

A MetadataFormula that returns valid values for this parameter, optionally matching a search query. This can be useful both if there are a fixed number of valid values for the parameter, or if the valid values from the parameter can be looked up from some API. Use makeMetadataFormula to wrap a function that implements your autocomplete logic. Typically once you have fetched the list of matching values, you'll use autocompleteSearchObjects to handle searching over those values. If you have a hardcoded list of valid values, you would only need to use makeSimpleAutocompleteMetadataFormula.

Defined in

api_types.ts:229


defaultValue

Optional defaultValue: DefaultValueType<T>

The default value to be used for this parameter if it is not specified by the user.

Defined in

api_types.ts:233


description

description: string

A brief description of what this parameter is used for, shown to the user when invoking the formula.

Defined in

api_types.ts:211


name

name: string

The name of the parameter, which will be shown to the user when invoking this formula.

Defined in

api_types.ts:203


optional

Optional optional: boolean

Whether this parameter can be omitted when invoking the formula. All optional parameters must come after all non-optional parameters.

Defined in

api_types.ts:216


type

type: T

The data type of this parameter (string, number, etc).

Defined in

api_types.ts:207