@salesforce/salesforcedx-vscode-test-tools
Version:
Test automation framework for Salesforce Extensions for VS Code
38 lines (37 loc) • 1.75 kB
TypeScript
/**
* Opens the workspace settings editor
*/
export declare function inWorkspaceSettings(): Promise<void>;
/**
* Opens the user settings editor
*/
export declare function inUserSettings(): Promise<void>;
/**
* Enables a boolean setting
* @param id - The ID of the setting to enable
* @param settingsType - Whether to modify user or workspace settings, defaults to workspace
* @returns True if the setting was successfully enabled
*/
export declare function enableBooleanSetting(id: string, settingsType?: 'user' | 'workspace'): Promise<boolean>;
/**
* Disables a boolean setting
* @param id - The ID of the setting to disable
* @param settingsType - Whether to modify user or workspace settings, defaults to workspace
* @returns True if the setting was successfully disabled
*/
export declare function disableBooleanSetting(id: string, settingsType?: 'user' | 'workspace'): Promise<boolean>;
/**
* Checks if a boolean setting is enabled
* @param id - The ID of the setting to check
* @param settingsType - Whether to check user or workspace settings, defaults to workspace
* @returns True if the setting is enabled, false otherwise
*/
export declare function isBooleanSettingEnabled(id: string, settingsType?: 'user' | 'workspace'): Promise<boolean>;
/**
* Sets the value of a specified setting in VSCode.
* @param id - The unique identifier of the setting to be updated.
* @param value - The new value to set for the specified setting.
* @param isWorkspace - True if the setting is a workspace setting; false if it's a user setting.
* @returns A promise that resolves when the setting value has been updated.
*/
export declare const setSettingValue: (id: string, value: string | boolean, isWorkspace: boolean) => Promise<void>;