Theia API Documentation v1.65.0
    Preparing search index...

    Abtracts the way to read and write preferences to a given resource

    interface PreferenceStorage {
        onDidChangeFileContent: Registration<
            FileContentStatus,
            Promise<boolean>,
        >;
        dispose(): void;
        read(): Promise<string>;
        writeValue(key: string, path: string[], value: JSONValue): Promise<boolean>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    onDidChangeFileContent: Registration<FileContentStatus, Promise<boolean>>

    List of listeners that will get a string with the newly stored resource content and should return a promise that resolves when they are done with their processing

    Methods

    • Dispose this object.

      Returns void

    • Write a value to the underlying preference store

      Parameters

      • key: string

        the preference key

      • path: string[]

        the path to the JSON object to change

      • value: JSONValue

        the new preference value

      Returns Promise<boolean>

      a promise that will resolve when all "onStored" listeners have finished