Add letterSpacing typings and test

This commit is contained in:
Daniel Imms
2017-10-13 13:38:28 -07:00
parent e86aebaa41
commit db6695435d
2 changed files with 9 additions and 2 deletions
+2
View File
@@ -140,6 +140,7 @@ namespace methods_core {
const r18: (data: string) => void = t.getOption('handler');
const r19: string = t.getOption('bellSound');
const r20: string = t.getOption('bellStyle');
const r22: number = t.getOption('letterSpacing');
}
{
const t: Terminal = new Terminal();
@@ -157,6 +158,7 @@ namespace methods_core {
t.setOption('useFlowControl', true);
t.setOption('visualBell', true);
t.setOption('colors', ['a', 'b']);
t.setOption('letterSpacing', 1);
t.setOption('cols', 1);
t.setOption('rows', 1);
t.setOption('tabStopWidth', 1);
+7 -2
View File
@@ -51,6 +51,11 @@ interface ITerminalOptions {
*/
fontFamily?: string;
/**
* The spacing in whole pixels between characters..
*/
letterSpacing?: number;
/**
* The line height used to render text.
*/
@@ -407,7 +412,7 @@ declare module 'xterm' {
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: 'cols' | 'fontSize' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number;
getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number;
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
@@ -459,7 +464,7 @@ declare module 'xterm' {
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'cols' | 'fontSize' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback', value: number): void;
setOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback', value: number): void;
/**
* Sets an option on the terminal.
* @param key The option key.