Settings Interface
Beta
The current set of Settings for a Workspace.
Methods
Name | Description | |
---|---|---|
addDictionary(dictionaryName: string, priority: SettingsPriority, settings: SettingObject): void | Add a SettingDictionary object. | |
addDirectory(dirName: string, priority: SettingsPriority): void | Add all files in the supplied directory with the extension ".json" or ".json5" | |
addFile(fileName: string, priority: SettingsPriority): void | Add a SettingDictionary from a local settings file. | |
addJson(dictionaryName: string, priority: SettingsPriority, settingsJson: string): void | Add a SettingDictionary from a JSON5 stringified string. | |
close(): void | ||
dropDictionary(dictionaryName: string): void | Remove a SettingDictionary by name. | |
getArray<T extends JSONSchemaType>(settingName: string): undefined | T[] | ||
getArray<T extends JSONSchemaType>(settingName: string, defaultValue: T[]): T[] | Get an array setting by SettingName. | |
getBoolean(settingName: string, defaultValue: boolean): boolean | Get a boolean setting by SettingName. | |
getBoolean(settingName: string, defaultValue?: boolean): undefined | boolean | ||
getNumber(settingName: string): undefined | number | ||
getNumber(settingName: string, defaultValue: number): number | Get a number setting by SettingName. | |
getObject<T extends object>(settingName: string): undefined | T | ||
getObject<T extends object>(settingName: string, defaultValue: T): T | Get an object setting by SettingName. | |
getSetting<T extends JSONSchemaType>(settingName: string, defaultValue?: T): undefined | T | Get the highest priority setting for a SettingName. | |
getString(settingName: string, defaultValue: string): string | Get a string setting by SettingName. | |
getString(settingName: string, defaultValue?: string): undefined | string | ||
inspectSetting<T extends JSONSchemaType>(name: string): SettingInspector<T>[] | Get an array of [[SettingInspector] objects, sorted in priority order, for all Settings that match a SettingName. | |
resolveSetting<T extends JSONSchemaType>(settingName: string, resolver: SettingResolver<T>, defaultValue: T): T | Resolve a setting, by name, using a SettingResolver. | |
resolveSetting<T extends JSONSchemaType>(settingName: string, resolver: SettingResolver<T>, defaultValue?: T): undefined | T |
Properties
Name | Type | Description | |
---|---|---|---|
onSettingsChanged Readonly | BeEvent<() => void> | Event raised whenever a SettingsDictionary is added or removed. |
Defined in
Last Updated: 20 June, 2023