Function createPreferenceProxy

  • Creates a preference proxy for typesafe preference handling.

    Type Parameters

    • T

    Parameters

    Returns PreferenceProxy<T>

    the created preference proxy.

    Usage

    1. Create JSON Schema specifying your preferences
    2. Create Configuration type based on the JSON Schema
    3. Bind the return value of createPreferenceProxy to make your preferences available wherever needed.

    See CorePreferences for an example.

    Note that if schema is a Promise, most actions will be no-ops until the promise is resolved.

    Deprecated

    Since

    1.23.0 use PreferenceProxyFactory instead.