Simplify options API

Fixes #4259
This commit is contained in:
Daniel Imms
2022-12-11 11:33:03 -08:00
parent c7660fb49c
commit 69379ba59b
+4 -9
View File
@@ -704,29 +704,24 @@ declare module 'xterm' {
* Gets or sets the terminal options. This supports setting multiple options. * Gets or sets the terminal options. This supports setting multiple options.
* *
* @example Get a single option * @example Get a single option
* ```typescript * ```ts
* console.log(terminal.options.fontSize); * console.log(terminal.options.fontSize);
* ``` * ```
*/
get options(): Required<ITerminalOptions>;
/**
* Gets or sets the terminal options. This supports setting multiple options.
* *
* @example Set a single option * @example Set a single option
* ```typescript * ```ts
* terminal.options.fontSize = 12; * terminal.options.fontSize = 12;
* ``` * ```
* *
* @example Set multiple options * @example Set multiple options
* ```typescript * ```ts
* terminal.options = { * terminal.options = {
* fontSize: 12, * fontSize: 12,
* fontFamily: 'Arial', * fontFamily: 'Arial',
* }; * };
* ``` * ```
*/ */
set options(options: ITerminalOptions); options: ITerminalOptions;
/** /**
* Natural language strings that can be localized. * Natural language strings that can be localized.