Skip to content

@vttforge/types / RegisteredSetting

Interface: RegisteredSetting<T> ​

One entry of the settings registry: what register was given, plus the three fields it fills in.

Registration normalises as it stores. It falls back to the client scope when the caller names one that does not exist, and to a null default when there is none, because a setting value may be null and may not be undefined. So an entry read back here always carries a real scope and a real default, whatever the call passed.

Extends ​

Type Parameters ​

T ​

T = unknown

Properties ​

choices? ​

readonly optional choices?: Readonly<Record<string, string>>

Inherited from ​

SettingConfig.choices


config? ​

readonly optional config?: boolean

Show it in the settings menu. Leave it off for a schema version.

Inherited from ​

SettingConfig.config


default ​

readonly default: T

Inherited from ​

SettingConfig.default


hint? ​

readonly optional hint?: string

Inherited from ​

SettingConfig.hint


id ​

readonly id: string

namespace.key, the id the registry is keyed by.


key ​

readonly key: string


name? ​

readonly optional name?: string

Inherited from ​

SettingConfig.name


namespace ​

readonly namespace: string


onChange? ​

readonly optional onChange?: (value) => void

Parameters ​

value ​

T

Returns ​

void

Inherited from ​

SettingConfig.onChange


range? ​

readonly optional range?: object

max ​

readonly max: number

min ​

readonly min: number

step? ​

readonly optional step?: number

Inherited from ​

SettingConfig.range


requiresReload? ​

readonly optional requiresReload?: boolean

Inherited from ​

SettingConfig.requiresReload


scope ​

readonly scope: SettingScope

Inherited from ​

SettingConfig.scope


type ​

readonly type: unknown

Inherited from ​

SettingConfig.type

MIT licensed.