Make Terminal API properties readonly

Fixes #1867
This commit is contained in:
Daniel Imms
2018-12-31 20:09:48 -08:00
parent 4375b3cdb9
commit 338558d86c
7 changed files with 27 additions and 23 deletions
+11 -7
View File
@@ -325,28 +325,32 @@ declare module 'xterm' {
/**
* The element containing the terminal.
*/
element: HTMLElement;
readonly element: HTMLElement;
/**
* The textarea that accepts input for the terminal.
*/
textarea: HTMLTextAreaElement;
readonly textarea: HTMLTextAreaElement;
/**
* The number of rows in the terminal's viewport.
* The number of rows in the terminal's viewport. Use
* `ITerminalOptions.rows` to set this in the constructor and
* `Terminal.resize` for when the terminal exists.
*/
rows: number;
readonly rows: number;
/**
* The number of columns in the terminal's viewport.
* The number of columns in the terminal's viewport. Use
* `ITerminalOptions.cols` to set this in the constructor and
* `Terminal.resize` for when the terminal exists.
*/
cols: number;
readonly cols: number;
/**
* (EXPERIMENTAL) Get all markers registered against the buffer. If the alt
* buffer is active this will always return [].
*/
markers: IMarker[];
readonly markers: IMarker[];
/**
* Natural language strings that can be localized.