From 4b9ab8184845a3ec727f51a6e2e54d99e1063a6c Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri, 22 Oct 2021 10:34:25 -0700 Subject: [PATCH] Add deprecated to getOption/setOption --- typings/xterm.d.ts | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index 3b59e4a9..f67e3a16 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -969,26 +969,31 @@ declare module 'xterm' { /** * Retrieves an option's value from the terminal. * @param key The option key. + * @deprecated Use `options` instead. */ getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string; /** * Retrieves an option's value from the terminal. * @param key The option key. + * @deprecated Use `options` instead. */ getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'visualBell' | 'windowsMode'): boolean; /** * Retrieves an option's value from the terminal. * @param key The option key. + * @deprecated Use `options` instead. */ getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number; /** * Retrieves an option's value from the terminal. * @param key The option key. + * @deprecated Use `options` instead. */ getOption(key: 'fontWeight' | 'fontWeightBold'): FontWeight; /** * Retrieves an option's value from the terminal. * @param key The option key. + * @deprecated Use `options` instead. */ getOption(key: string): any; @@ -996,60 +1001,70 @@ declare module 'xterm' { * Sets an option on the terminal. * @param key The option key. * @param value The option value. + * @deprecated Use `options` instead. */ setOption(key: 'fontFamily' | 'termName' | 'bellSound' | 'wordSeparator', value: string): void; /** - * Sets an option on the terminal. - * @param key The option key. - * @param value The option value. - */ + * Sets an option on the terminal. + * @param key The option key. + * @param value The option value. + * @deprecated Use `options` instead. + */ setOption(key: 'fontWeight' | 'fontWeightBold', value: null | 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | number): void; /** - * Sets an option on the terminal. - * @param key The option key. - * @param value The option value. - */ + * Sets an option on the terminal. + * @param key The option key. + * @param value The option value. + * @deprecated Use `options` instead. + */ setOption(key: 'logLevel', value: LogLevel): void; /** * Sets an option on the terminal. * @param key The option key. * @param value The option value. + * @deprecated Use `options` instead. */ setOption(key: 'bellStyle', value: null | 'none' | 'visual' | 'sound' | 'both'): void; /** * Sets an option on the terminal. * @param key The option key. * @param value The option value. + * @deprecated Use `options` instead. */ setOption(key: 'cursorStyle', value: null | 'block' | 'underline' | 'bar'): void; /** * Sets an option on the terminal. * @param key The option key. * @param value The option value. + * @deprecated Use `options` instead. */ setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'visualBell' | 'windowsMode', value: boolean): void; /** * Sets an option on the terminal. * @param key The option key. * @param value The option value. + * @deprecated Use `options` instead. */ setOption(key: 'fontSize' | 'letterSpacing' | 'lineHeight' | 'tabStopWidth' | 'scrollback', value: number): void; /** * Sets an option on the terminal. * @param key The option key. * @param value The option value. + * @deprecated Use `options` instead. */ setOption(key: 'theme', value: ITheme): void; /** * Sets an option on the terminal. * @param key The option key. * @param value The option value. + * @deprecated Use `options` instead. */ setOption(key: 'cols' | 'rows', value: number): void; /** * Sets an option on the terminal. * @param key The option key. * @param value The option value. + * @deprecated Use `options` instead. */ setOption(key: string, value: any): void;