@intisy/bayonet
    Preparing search index...

    Interface PluginConfig

    One plugin's configuration, already resolved by the host.

    interface PluginConfig {
        all(): Record<string, unknown>;
        get<T>(key: string): T | undefined;
        set(key: string, value: unknown): Promise<void>;
    }
    Index
    • Every setting, defaults merged with what is on disk.

      Returns Record<string, unknown>

      the setting keys mapped to their effective values

    • One setting, absent when it is neither set nor defaulted.

      Type Parameters

      • T

        the setting's expected value type

      Parameters

      • key: string

        the setting's name

      Returns T | undefined

      the setting's effective value, or null when it is neither set nor defaulted

    • Writes one setting.

      Parameters

      • key: string

        the setting's name

      • value: unknown

        the value to write

      Returns Promise<void>

      a stage that completes once the setting is written

      Asynchronous even where a host implements it synchronously, because the seam has to survive a host that runs the plugin out of process.