T

Bucket

A Bucket: a named, persisted group of settings. Keys are dot-separated paths.

type Bucket = { … }

Members

clear() => void

Deletes every setting in the Bucket.

get<T>(key: string, def: T) => Widen<T>

Reads a value, falling back to def when the key is not set.

remove(key: string) => void

Deletes a value and prunes the objects it leaves empty.

set(key: string, value: SettingsValue) => void

Writes a value, creating intermediate objects.

toggle(key: string, def: boolean) => void

Flips a boolean against its current value, or def when the key is not set.