Merge pull request #4304 from Tyriar/4259

Simplify options API
This commit is contained in:
Daniel Imms
2022-12-11 11:52:08 -08:00
committed by GitHub
9 changed files with 42 additions and 48 deletions
+2 -7
View File
@@ -537,11 +537,6 @@ declare module 'xterm-headless' {
* ```typescript
* 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
* ```typescript
@@ -552,11 +547,11 @@ declare module 'xterm-headless' {
* ```typescript
* terminal.options = {
* fontSize: 12,
* fontFamily: 'Arial',
* fontFamily: 'Courier New',
* };
* ```
*/
set options(options: ITerminalOptions);
options: ITerminalOptions;
/**
* Natural language strings that can be localized.
+5 -10
View File
@@ -710,29 +710,24 @@ declare module 'xterm' {
* Gets or sets the terminal options. This supports setting multiple options.
*
* @example Get a single option
* ```typescript
* ```ts
* 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
* ```typescript
* ```ts
* terminal.options.fontSize = 12;
* ```
*
* @example Set multiple options
* ```typescript
* ```ts
* terminal.options = {
* fontSize: 12,
* fontFamily: 'Arial',
* fontFamily: 'Courier New'
* };
* ```
*/
set options(options: ITerminalOptions);
options: ITerminalOptions;
/**
* Natural language strings that can be localized.