mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Remove jsdoc types
They're redundant in TS/tsdoc
This commit is contained in:
+1
-4
@@ -18,7 +18,7 @@ export class BufferSet extends EventEmitter implements IBufferSet {
|
||||
|
||||
/**
|
||||
* Create a new BufferSet for the given terminal.
|
||||
* @param {Terminal} terminal - The terminal the BufferSet will belong to
|
||||
* @param _terminal - The terminal the BufferSet will belong to
|
||||
*/
|
||||
constructor(private _terminal: ITerminal) {
|
||||
super();
|
||||
@@ -35,7 +35,6 @@ export class BufferSet extends EventEmitter implements IBufferSet {
|
||||
|
||||
/**
|
||||
* Returns the alt Buffer of the BufferSet
|
||||
* @returns {Buffer}
|
||||
*/
|
||||
public get alt(): Buffer {
|
||||
return this._alt;
|
||||
@@ -43,7 +42,6 @@ export class BufferSet extends EventEmitter implements IBufferSet {
|
||||
|
||||
/**
|
||||
* Returns the normal Buffer of the BufferSet
|
||||
* @returns {Buffer}
|
||||
*/
|
||||
public get active(): Buffer {
|
||||
return this._activeBuffer;
|
||||
@@ -51,7 +49,6 @@ export class BufferSet extends EventEmitter implements IBufferSet {
|
||||
|
||||
/**
|
||||
* Returns the currently active Buffer of the BufferSet
|
||||
* @returns {Buffer}
|
||||
*/
|
||||
public get normal(): Buffer {
|
||||
return this._normal;
|
||||
|
||||
@@ -61,7 +61,7 @@ export class CompositionHelper {
|
||||
|
||||
/**
|
||||
* Handles the compositionupdate event, updating the composition view.
|
||||
* @param {CompositionEvent} ev The event.
|
||||
* @param ev The event.
|
||||
*/
|
||||
public compositionupdate(ev: CompositionEvent): void {
|
||||
this._compositionView.textContent = ev.data;
|
||||
|
||||
+29
-30
@@ -214,7 +214,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
/**
|
||||
* Creates a new `Terminal` object.
|
||||
*
|
||||
* @param {object} options An object containing a set of options, the available options are:
|
||||
* @param options An object containing a set of options, the available options are:
|
||||
* - `cursorBlink` (boolean): Whether the terminal cursor blinks
|
||||
* - `cols` (number): The number of columns of the terminal (horizontal size)
|
||||
* - `rows` (number): The number of rows of the terminal (vertical size)
|
||||
@@ -348,7 +348,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Retrieves an option's value from the terminal.
|
||||
* @param {string} key The option key.
|
||||
* @param key The option key.
|
||||
*/
|
||||
public getOption(key: string): any {
|
||||
if (!(key in DEFAULT_OPTIONS)) {
|
||||
@@ -360,8 +360,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param {string} key The option key.
|
||||
* @param {any} value The option value.
|
||||
* @param key The option key.
|
||||
* @param value The option value.
|
||||
*/
|
||||
public setOption(key: string, value: any): void {
|
||||
if (!(key in DEFAULT_OPTIONS)) {
|
||||
@@ -602,7 +602,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
/**
|
||||
* Opens the terminal within an element.
|
||||
*
|
||||
* @param {HTMLElement} parent The element to create the terminal within.
|
||||
* @param parent The element to create the terminal within.
|
||||
*/
|
||||
public open(parent: HTMLElement): void {
|
||||
this._parent = parent || this._parent;
|
||||
@@ -1098,8 +1098,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
/**
|
||||
* Tells the renderer to refresh terminal content between two rows (inclusive) at the next
|
||||
* opportunity.
|
||||
* @param {number} start The row to start from (between 0 and this.rows - 1).
|
||||
* @param {number} end The row to end at (between start and this.rows - 1).
|
||||
* @param start The row to start from (between 0 and this.rows - 1).
|
||||
* @param end The row to end at (between start and this.rows - 1).
|
||||
*/
|
||||
public refresh(start: number, end: number): void {
|
||||
if (this.renderer) {
|
||||
@@ -1109,8 +1109,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Queues linkification for the specified rows.
|
||||
* @param {number} start The row to start from (between 0 and this.rows - 1).
|
||||
* @param {number} end The row to end at (between start and this.rows - 1).
|
||||
* @param start The row to start from (between 0 and this.rows - 1).
|
||||
* @param end The row to end at (between start and this.rows - 1).
|
||||
*/
|
||||
private _queueLinkification(start: number, end: number): void {
|
||||
if (this.linkifier) {
|
||||
@@ -1202,8 +1202,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Scroll the display of the terminal
|
||||
* @param {number} disp The number of lines to scroll down (negative scroll up).
|
||||
* @param {boolean} suppressScrollEvent Don't emit the scroll event as scrollLines. This is used
|
||||
* @param disp The number of lines to scroll down (negative scroll up).
|
||||
* @param suppressScrollEvent Don't emit the scroll event as scrollLines. This is used
|
||||
* to avoid unwanted events being handled by the viewport when the event was triggered from the
|
||||
* viewport originally.
|
||||
*/
|
||||
@@ -1234,7 +1234,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Scroll the display of the terminal by a number of pages.
|
||||
* @param {number} pageCount The number of pages to scroll (negative scrolls up).
|
||||
* @param pageCount The number of pages to scroll (negative scrolls up).
|
||||
*/
|
||||
public scrollPages(pageCount: number): void {
|
||||
this.scrollLines(pageCount * (this.rows - 1));
|
||||
@@ -1263,7 +1263,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Writes text to the terminal.
|
||||
* @param {string} data The text to write to the terminal.
|
||||
* @param data The text to write to the terminal.
|
||||
*/
|
||||
public write(data: string): void {
|
||||
// Ignore falsy data values (including the empty string)
|
||||
@@ -1329,7 +1329,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Writes text to the terminal, followed by a break line character (\n).
|
||||
* @param {string} data The text to write to the terminal.
|
||||
* @param data The text to write to the terminal.
|
||||
*/
|
||||
public writeln(data: string): void {
|
||||
this.write(data + '\r\n');
|
||||
@@ -1442,7 +1442,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
* Handle a keydown event
|
||||
* Key Resources:
|
||||
* - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent
|
||||
* @param {KeyboardEvent} ev The keydown event to be handled.
|
||||
* @param ev The keydown event to be handled.
|
||||
*/
|
||||
protected _keyDown(event: KeyboardEvent): boolean {
|
||||
if (this._customKeyEventHandler && this._customKeyEventHandler(event) === false) {
|
||||
@@ -1539,7 +1539,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
* Handle a keypress event.
|
||||
* Key Resources:
|
||||
* - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent
|
||||
* @param {KeyboardEvent} ev The keypress event to be handled.
|
||||
* @param ev The keypress event to be handled.
|
||||
*/
|
||||
protected _keyPress(ev: KeyboardEvent): boolean {
|
||||
let key;
|
||||
@@ -1578,7 +1578,6 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Send data for handling to the terminal
|
||||
* @param {string} data
|
||||
*/
|
||||
public send(data: string): void {
|
||||
if (!this._sendDataQueue) {
|
||||
@@ -1631,8 +1630,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
/**
|
||||
* Resizes the terminal.
|
||||
*
|
||||
* @param {number} x The number of columns to resize to.
|
||||
* @param {number} y The number of rows to resize to.
|
||||
* @param x The number of columns to resize to.
|
||||
* @param y The number of rows to resize to.
|
||||
*/
|
||||
public resize(x: number, y: number): void {
|
||||
if (isNaN(x) || isNaN(y)) {
|
||||
@@ -1666,7 +1665,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Updates the range of rows to refresh
|
||||
* @param {number} y The number of rows to refresh next.
|
||||
* @param y The number of rows to refresh next.
|
||||
*/
|
||||
public updateRange(y: number): void {
|
||||
if (y < this._refreshStart) this._refreshStart = y;
|
||||
@@ -1689,8 +1688,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Erase in the identified line everything from "x" to the end of the line (right).
|
||||
* @param {number} x The column from which to start erasing to the end of the line.
|
||||
* @param {number} y The line in which to operate.
|
||||
* @param x The column from which to start erasing to the end of the line.
|
||||
* @param y The line in which to operate.
|
||||
*/
|
||||
public eraseRight(x: number, y: number): void {
|
||||
const line = this.buffer.lines.get(this.buffer.ybase + y);
|
||||
@@ -1706,8 +1705,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Erase in the identified line everything from "x" to the start of the line (left).
|
||||
* @param {number} x The column from which to start erasing to the start of the line.
|
||||
* @param {number} y The line in which to operate.
|
||||
* @param x The column from which to start erasing to the start of the line.
|
||||
* @param y The line in which to operate.
|
||||
*/
|
||||
public eraseLeft(x: number, y: number): void {
|
||||
const line = this.buffer.lines.get(this.buffer.ybase + y);
|
||||
@@ -1744,7 +1743,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Erase all content in the given line
|
||||
* @param {number} y The line to erase all of its contents.
|
||||
* @param y The line to erase all of its contents.
|
||||
*/
|
||||
public eraseLine(y: number): void {
|
||||
this.eraseRight(0, y);
|
||||
@@ -1752,9 +1751,9 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Return the data array of a blank line
|
||||
* @param {boolean} cur First bunch of data for each "blank" character.
|
||||
* @param {boolean} isWrapped Whether the new line is wrapped from the previous line.
|
||||
* @param {boolean} cols The number of columns in the terminal, if this is not
|
||||
* @param cur First bunch of data for each "blank" character.
|
||||
* @param isWrapped Whether the new line is wrapped from the previous line.
|
||||
* @param cols The number of columns in the terminal, if this is not
|
||||
* set, the terminal's current column count would be used.
|
||||
*/
|
||||
public blankLine(cur?: boolean, isWrapped?: boolean, cols?: number): LineData {
|
||||
@@ -1798,7 +1797,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Emit the 'data' event and populate the given data.
|
||||
* @param {string} data The data to populate in the event.
|
||||
* @param data The data to populate in the event.
|
||||
*/
|
||||
public handler(data: string): void {
|
||||
// Prevents all events to pty process if stdin is disabled
|
||||
@@ -1820,7 +1819,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
/**
|
||||
* Emit the 'title' event and populate the given title.
|
||||
* @param {string} title The title to populate in the event.
|
||||
* @param title The title to populate in the event.
|
||||
*/
|
||||
public handleTitle(title: string): void {
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@ export function bracketTextForPaste(text: string, bracketedPasteMode: boolean):
|
||||
|
||||
/**
|
||||
* Binds copy functionality to the given terminal.
|
||||
* @param {ClipboardEvent} ev The original copy event to be handled
|
||||
* @param ev The original copy event to be handled
|
||||
*/
|
||||
export function copyHandler(ev: ClipboardEvent, term: ITerminal, selectionManager: ISelectionManager): void {
|
||||
if (term.browser.isMSIE) {
|
||||
@@ -50,8 +50,8 @@ export function copyHandler(ev: ClipboardEvent, term: ITerminal, selectionManage
|
||||
|
||||
/**
|
||||
* Redirect the clipboard's data to the terminal's input handler.
|
||||
* @param {ClipboardEvent} ev The original paste event to be handled
|
||||
* @param {Terminal} term The terminal on which to apply the handled paste event
|
||||
* @param ev The original paste event to be handled
|
||||
* @param term The terminal on which to apply the handled paste event
|
||||
*/
|
||||
export function pasteHandler(ev: ClipboardEvent, term: ITerminal): void {
|
||||
ev.stopPropagation();
|
||||
|
||||
@@ -174,8 +174,8 @@ export class Renderer extends EventEmitter implements IRenderer {
|
||||
/**
|
||||
* Queues a refresh between two rows (inclusive), to be done on next animation
|
||||
* frame.
|
||||
* @param {number} start The start row.
|
||||
* @param {number} end The end row.
|
||||
* @param start The start row.
|
||||
* @param end The end row.
|
||||
*/
|
||||
public refreshRows(start: number, end: number): void {
|
||||
if (this._isPaused) {
|
||||
|
||||
@@ -22,8 +22,8 @@ export const isLinux = platform.indexOf('Linux') >= 0;
|
||||
|
||||
/**
|
||||
* Return if the given array contains the given element
|
||||
* @param {Array} array The array to search for the given element.
|
||||
* @param {Object} el The element to look for into the array
|
||||
* @param arr The array to search for the given element.
|
||||
* @param el The element to look for into the array
|
||||
*/
|
||||
function contains(arr: any[], el: any): boolean {
|
||||
return arr.indexOf(el) >= 0;
|
||||
|
||||
Reference in New Issue
Block a user