Improve types and add bellStyle/bellSound

This commit is contained in:
Daniel Imms
2017-08-19 13:30:37 -07:00
parent 34e1ee2bf6
commit fa015d91fe
3 changed files with 22 additions and 3 deletions
+14 -2
View File
@@ -290,7 +290,7 @@ declare module 'xterm' {
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: 'cursorStyle' | 'termName'): string;
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'termName'): string;
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
@@ -322,7 +322,19 @@ declare module 'xterm' {
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'cursorStyle' | 'termName', value: string): void;
setOption(key: 'termName' | 'bellSound', value: string): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'bellStyle', value: 'none' | 'visual' | 'sound' | 'both'): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'cursorStyle', value: 'block' | 'underline' | 'bar'): void;
/**
* Sets an option on the terminal.
* @param key The option key.