<T>(key: string, to_default_value: () => T, validate?: ((value: any) => asserts value is T) | undefined): T import {load_from_storage} from '@fuzdev/fuz_mastodon/storage.js'; Loads key and falls back to defaultValue.
If validate is provided and throws, it removes the key and returns undefined.
key
type
stringto_default_value
type
() => Tvalidate?
type
((value: any) => asserts value is T) | undefinedoptional
returns
T generics
load_from_storage<T>