Skip to content

Interface: OptionalParamDef<T>

core.OptionalParamDef

Marker type for an optional ParamDef, used internally.

Type parameters

Name Type
T extends UnionType

Hierarchy

OptionalParamDef

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.

Inherited from

ParamDef.autocomplete

Defined in

api_types.ts:329


defaultValue

Optional defaultValue: SuggestedValueType<T>

Deprecated

This will be removed in a future version of the SDK. Use suggestedValue instead.

Inherited from

ParamDef.defaultValue

Defined in

api_types.ts:333


description

description: string

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

Inherited from

ParamDef.description

Defined in

api_types.ts:311


name

name: string

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

Inherited from

ParamDef.name

Defined in

api_types.ts:303


optional

optional: true

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

Overrides

ParamDef.optional

Defined in

api_types.ts:348


suggestedValue

Optional suggestedValue: SuggestedValueType<T>

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

Inherited from

ParamDef.suggestedValue

Defined in

api_types.ts:337


type

type: T

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

Inherited from

ParamDef.type

Defined in

api_types.ts:307