Skip to content

SettingDef beta ​

TypeAlias of @v12-engine/client

ts
export type SettingDef = (SettingBase<boolean> & {
    kind: 'toggle';
}) | (SettingBase<number> & {
    kind: 'number';
    min: number;
    max: number;
    step?: number;
    show?: (value: number) => string;
}) | (SettingBase<string> & {
    kind: 'choice';
    options: readonly {
        value: string;
        label: string;
    }[];
}) | (SettingBase<string> & {
    kind: 'text';
})
/** A colour, as `#rrggbb` */
 | (SettingBase<string> & {
    kind: 'color';
});

A setting: on or off, a number in a range, one of a few, words, or a colour