Phials plugin documentation
User guide
AI Disclosure: This page was generated by an LLM and may contain inaccuracies. Hand-crafted documentation will be implemented over time on the road to 1.0

PluginSettings

Since Plugin API: 1.0.0

Plugin settings proxy for a specific plugin

Signature

interface PluginSettings {
    get<T>(key: string): T | undefined;
    set(key: string, value: unknown): Promise<void>;
    getAll(): Readonly<Record<string, unknown>>;
    getStored(key: string): unknown;
    unset(key: string): Promise<void>;
    reset(): Promise<void>;
    onChange(handler: (change: PluginSettingsChange) => void): PluginSettingsSubscription;
}

Members

NameTypeRequiredDescription
get(key: string) => T | undefinedyes-
set(key: string, value: unknown) => Promise<void>yes-
getAll() => Readonly<Record<string, unknown>>yes-
getStored(key: string) => unknownyesRead the unvalidated durable value for migration or recovery.
unset(key: string) => Promise<void>yesRemove one durable value and reveal the schema default.
reset() => Promise<void>yesRemove every durable value and reveal all schema defaults.
onChange(handler: (change:PluginSettingsChange) => void) =>PluginSettingsSubscriptionyes-