Type alias PreferenceProxy<T>

PreferenceProxy<T>: Readonly<T> & Disposable & PreferenceEventEmitter<T> & PreferenceRetrieval<T>

Typesafe schema-based preferences utility based on the PreferenceService. Can be used to get preferences as well as listen to preference changes.

See createPreferenceProxy on how to instantiate preference proxies.

Example usage

preferences.onPreferenceChanged(({ preferenceName, newValue }) => { ... });
const enabled = preferences['myext.enabled'];

Type Parameters

  • T