Skip to main content

types.SelectSetting#

Defines a dropdown setting.

SYNTAX#

{ key: string; type: 'select'; label: string; default: string; options: { value: string; label: string }[] }

ARGUMENTS#

  • key (string) — Setting key.
  • type ('select') — Discriminator.
  • label (string) — Display label.
  • default (string) — Default selected value (must match one of the option values).
  • options ({ value: string; label: string }[]) — Selectable options.

RETURNS#

Type definition.

EXAMPLE#

{ key: 'source', type: 'select', default: 'close', label: 'Source', options: [
  { value: 'close', label: 'Close' },
  { value: 'hl2',   label: 'HL2'   },
  { value: 'hlc3',  label: 'HLC3'  }
]}

SEE ALSO#

types.NumberSetting, types.ColorSetting, types.BooleanSetting, indicator.getSettings