import { Editor, EditorLocators } from './Editor.js'; import { ContextMenu } from '../menu/ContextMenu.js'; import { EditorView, EditorGroup } from '../index.js'; import { IPageDecorator, BasePage, VSCodeLocatorMap } from '../utils.js'; import { SettingsEditor as SettingsEditorLocators } from '../../locators/1.73.0.js'; export interface SettingsEditor extends IPageDecorator { } /** * Page object representing the internal VSCode settings editor * * @category Editor */ export declare class SettingsEditor extends Editor { /** * @private */ locatorKey: "SettingsEditor"; view: EditorView | EditorGroup; constructor(locators: VSCodeLocatorMap, view?: EditorView | EditorGroup); /** * Search for a setting with a particular title and category. * Returns an appropriate Setting object if the label is found, * undefined otherwise. * * If your setting has nested categories (i.e `example.general.test`), * pass in each category as a separate string. * * @param title title of the setting * @param categories category of the setting * @returns Promise resolving to a Setting object if found, undefined otherwise */ findSetting(title: string, ...categories: string[]): Promise; /** * Switch between settings perspectives * Works only if your vscode instance has both user and workspace settings available * * @param perspective User or Workspace * @returns Promise that resolves when the appropriate button is clicked */ switchToPerspective(perspective: 'User' | 'Workspace'): Promise; /** * Context menu is disabled in this editor, throw an error */ openContextMenu(): Promise; private createSetting; } export interface Setting extends IPageDecorator { } /** * Abstract item representing a Setting with title, description and * an input element (combo/textbox/checkbox/link) * * @category Editor */ export declare abstract class Setting extends BasePage { settings: SettingsEditor; private title; private category; constructor(locators: VSCodeLocatorMap, title: string, category: string, settings: SettingsEditor); /** * Get the value of the setting based on its input type * * @returns promise that resolves to the current value of the setting */ abstract getValue(): Promise; /** * Set the value of the setting based on its input type * * @param value boolean for checkboxes, string otherwise */ abstract setValue(value: string | boolean): Promise; /** * Get the category of the setting * All settings are labeled as Category: Title */ getCategory(): string; /** * Get description of the setting * @returns Promise resolving to setting description */ getDescription(): Promise; /** * Get title of the setting */ getTitle(): string; } /** * Setting with a combo box * * @category Editor */ export declare class ComboSetting extends Setting { /** * @private */ locatorKey: "SettingsEditor"; getValue(): Promise; setValue(value: string): Promise; /** * Get the labels of all options from the combo * @returns Promise resolving to array of string values */ getValues(): Promise; private getOptions; private openCombo; } export interface TextSetting extends IPageDecorator { } /** * Setting with a text box input * * @category Editor */ export declare class TextSetting extends Setting { /** * @private */ locatorKey: "SettingsEditor"; getValue(): Promise; setValue(value: string): Promise; } export interface TextSetting extends IPageDecorator { } /** * Setting with a checkbox * * @category Editor */ export declare class CheckboxSetting extends Setting { /** * @private */ locatorKey: "SettingsEditor"; getValue(): Promise; setValue(value: boolean): Promise; } export interface LinkSetting extends IPageDecorator { } /** * Setting with no value, with a link to settings.json instead * * @category Editor */ export declare class LinkSetting extends Setting { /** * @private */ locatorKey: "SettingsEditor"; getValue(): Promise; setValue(): Promise; /** * Open the link that leads to the value in settings.json * @returns Promise resolving when the link has been clicked */ openLink(): Promise; } //# sourceMappingURL=SettingsEditor.d.ts.map