@mendix/extensions-api - v0.2.4
    Preparing search index...

    Interface IPreferencesApi

    API for working with the user preferences.

    interface IPreferencesApi {
        _apiId: "mendix.PreferencesApi";
        addEventListener<K extends never>(
            eventType: K,
            listener: EventHandler<{}, K>,
        ): DisposeListener;
        getPreferences(): Promise<Preferences>;
        removeEventListener<K extends never>(
            eventType: K,
            listener: EventHandler<{}, K>,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _apiId: "mendix.PreferencesApi"

    Unique identifier for the Preferences API.

    Methods

    • Adds an event listener for the specified event type.

      Type Parameters

      • K extends never

      Parameters

      • eventType: K

        The type of event to listen for.

      • listener: EventHandler<{}, K>

        The event listener to add.

      Returns DisposeListener

      A function that can be called to remove the event listener.

    • Retrieves the preferences of Studio pro.

      Returns Promise<Preferences>

      A promise that resolves with the retrieved preferences.

    • Removes an event listener for the specified event type.

      Type Parameters

      • K extends never

      Parameters

      • eventType: K

        The type of event to remove the listener from.

      • listener: EventHandler<{}, K>

        The event listener to remove.

      Returns void