Add explicit types on set/getOption

This commit is contained in:
Daniel Imms
2017-08-06 01:42:57 -07:00
parent 7cd8d1ec74
commit 33cc78c987
2 changed files with 38 additions and 4 deletions
+23
View File
@@ -18,3 +18,26 @@ export type Charset = {[key: string]: string};
export type CharData = [number, string, number];
export type LineData = CharData[];
export type Option = BooleanOption | StringOption | StringArrayOption | NumberOption | GeometryOption | HandlerOption;
export type BooleanOption =
'cancelEvents' |
'convertEol' |
'cursorBlink' |
'debug' |
'disableStdin' |
'popOnBell' |
'screenKeys' |
'useFlowControl' |
'visualBell';
export type StringOption =
'cursorStyle' |
'termName';
export type StringArrayOption = 'colors';
export type NumberOption =
'cols' |
'rows' |
'tabStopWidth' |
'scrollback';
export type GeometryOption = 'geometry';
export type HandlerOption = 'handler';