An interface for manipulating the settings of a specific plugin.

Hierarchy

Implemented by

Properties

A signal that emits when the plugin's settings have changed.

The composite of user settings and extension defaults.

id: string

The plugin's ID.

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

plugin: IPlugin
raw: string

The plugin settings raw text value.

schema: ISchema

The plugin's schema.

The user settings.

version: string

The published version of the NPM package containing these settings.

Methods

  • Return the defaults in a commented JSON format.

    Returns string

  • Calculate the default value of a setting by iterating through the schema.

    Parameters

    • key: string

      The name of the setting whose default value is calculated.

    Returns PartialJSONValue

    A calculated default JSON value for a specific setting.

  • Dispose of the resources held by the object.

    Notes

    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    Undefined Behavior

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void

  • Get an individual setting.

    Parameters

    • key: string

      The name of the setting being retrieved.

    Returns {
        composite: ReadonlyPartialJSONValue;
        user: ReadonlyPartialJSONValue;
    }

    The setting value.

    • composite: ReadonlyPartialJSONValue
    • user: ReadonlyPartialJSONValue
  • Remove a single setting.

    Parameters

    • key: string

      The name of the setting being removed.

    Returns Promise<void>

    A promise that resolves when the setting is removed.

    Notes

    This function is asynchronous because it writes to the setting registry.

  • Save all of the plugin's user settings at once.

    Parameters

    • raw: string

    Returns Promise<void>

  • Set a single setting.

    Parameters

    • key: string

      The name of the setting being set.

    • value: PartialJSONValue

      The value of the setting.

    Returns Promise<void>

    A promise that resolves when the setting has been saved.

    Notes

    This function is asynchronous because it writes to the setting registry.

  • Validates raw settings with comments.

    Parameters

    • raw: string

      The JSON with comments string being validated.

    Returns ISchemaValidator.IError[]

    A list of errors or null if valid.

Generated using TypeDoc