Remove jsdoc types

They're redundant in TS/tsdoc
This commit is contained in:
Daniel Imms
2018-07-24 08:59:20 -07:00
parent 8f22d8dda4
commit bdfe877c8f
6 changed files with 38 additions and 42 deletions
+1 -4
View File
@@ -18,7 +18,7 @@ export class BufferSet extends EventEmitter implements IBufferSet {
/** /**
* Create a new BufferSet for the given terminal. * 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) { constructor(private _terminal: ITerminal) {
super(); super();
@@ -35,7 +35,6 @@ export class BufferSet extends EventEmitter implements IBufferSet {
/** /**
* Returns the alt Buffer of the BufferSet * Returns the alt Buffer of the BufferSet
* @returns {Buffer}
*/ */
public get alt(): Buffer { public get alt(): Buffer {
return this._alt; return this._alt;
@@ -43,7 +42,6 @@ export class BufferSet extends EventEmitter implements IBufferSet {
/** /**
* Returns the normal Buffer of the BufferSet * Returns the normal Buffer of the BufferSet
* @returns {Buffer}
*/ */
public get active(): Buffer { public get active(): Buffer {
return this._activeBuffer; return this._activeBuffer;
@@ -51,7 +49,6 @@ export class BufferSet extends EventEmitter implements IBufferSet {
/** /**
* Returns the currently active Buffer of the BufferSet * Returns the currently active Buffer of the BufferSet
* @returns {Buffer}
*/ */
public get normal(): Buffer { public get normal(): Buffer {
return this._normal; return this._normal;
+1 -1
View File
@@ -61,7 +61,7 @@ export class CompositionHelper {
/** /**
* Handles the compositionupdate event, updating the composition view. * Handles the compositionupdate event, updating the composition view.
* @param {CompositionEvent} ev The event. * @param ev The event.
*/ */
public compositionupdate(ev: CompositionEvent): void { public compositionupdate(ev: CompositionEvent): void {
this._compositionView.textContent = ev.data; this._compositionView.textContent = ev.data;
+29 -30
View File
@@ -214,7 +214,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
/** /**
* Creates a new `Terminal` object. * 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 * - `cursorBlink` (boolean): Whether the terminal cursor blinks
* - `cols` (number): The number of columns of the terminal (horizontal size) * - `cols` (number): The number of columns of the terminal (horizontal size)
* - `rows` (number): The number of rows of the terminal (vertical 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. * Retrieves an option's value from the terminal.
* @param {string} key The option key. * @param key The option key.
*/ */
public getOption(key: string): any { public getOption(key: string): any {
if (!(key in DEFAULT_OPTIONS)) { if (!(key in DEFAULT_OPTIONS)) {
@@ -360,8 +360,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
/** /**
* Sets an option on the terminal. * Sets an option on the terminal.
* @param {string} key The option key. * @param key The option key.
* @param {any} value The option value. * @param value The option value.
*/ */
public setOption(key: string, value: any): void { public setOption(key: string, value: any): void {
if (!(key in DEFAULT_OPTIONS)) { if (!(key in DEFAULT_OPTIONS)) {
@@ -602,7 +602,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
/** /**
* Opens the terminal within an element. * 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 { public open(parent: HTMLElement): void {
this._parent = parent || this._parent; 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 * Tells the renderer to refresh terminal content between two rows (inclusive) at the next
* opportunity. * opportunity.
* @param {number} start The row to start from (between 0 and this.rows - 1). * @param 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 end The row to end at (between start and this.rows - 1).
*/ */
public refresh(start: number, end: number): void { public refresh(start: number, end: number): void {
if (this.renderer) { if (this.renderer) {
@@ -1109,8 +1109,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
/** /**
* Queues linkification for the specified rows. * Queues linkification for the specified rows.
* @param {number} start The row to start from (between 0 and this.rows - 1). * @param 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 end The row to end at (between start and this.rows - 1).
*/ */
private _queueLinkification(start: number, end: number): void { private _queueLinkification(start: number, end: number): void {
if (this.linkifier) { if (this.linkifier) {
@@ -1202,8 +1202,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
/** /**
* Scroll the display of the terminal * Scroll the display of the terminal
* @param {number} disp The number of lines to scroll down (negative scroll up). * @param 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 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 * to avoid unwanted events being handled by the viewport when the event was triggered from the
* viewport originally. * 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. * 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 { public scrollPages(pageCount: number): void {
this.scrollLines(pageCount * (this.rows - 1)); this.scrollLines(pageCount * (this.rows - 1));
@@ -1263,7 +1263,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
/** /**
* Writes text to the terminal. * 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 { public write(data: string): void {
// Ignore falsy data values (including the empty string) // 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). * 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 { public writeln(data: string): void {
this.write(data + '\r\n'); this.write(data + '\r\n');
@@ -1442,7 +1442,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
* Handle a keydown event * Handle a keydown event
* Key Resources: * Key Resources:
* - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent * - 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 { protected _keyDown(event: KeyboardEvent): boolean {
if (this._customKeyEventHandler && this._customKeyEventHandler(event) === false) { if (this._customKeyEventHandler && this._customKeyEventHandler(event) === false) {
@@ -1539,7 +1539,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
* Handle a keypress event. * Handle a keypress event.
* Key Resources: * Key Resources:
* - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent * - 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 { protected _keyPress(ev: KeyboardEvent): boolean {
let key; let key;
@@ -1578,7 +1578,6 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
/** /**
* Send data for handling to the terminal * Send data for handling to the terminal
* @param {string} data
*/ */
public send(data: string): void { public send(data: string): void {
if (!this._sendDataQueue) { if (!this._sendDataQueue) {
@@ -1631,8 +1630,8 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
/** /**
* Resizes the terminal. * Resizes the terminal.
* *
* @param {number} x The number of columns to resize to. * @param x The number of columns to resize to.
* @param {number} y The number of rows to resize to. * @param y The number of rows to resize to.
*/ */
public resize(x: number, y: number): void { public resize(x: number, y: number): void {
if (isNaN(x) || isNaN(y)) { 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 * 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 { public updateRange(y: number): void {
if (y < this._refreshStart) this._refreshStart = y; 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). * 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 x The column from which to start erasing to the end of the line.
* @param {number} y The line in which to operate. * @param y The line in which to operate.
*/ */
public eraseRight(x: number, y: number): void { public eraseRight(x: number, y: number): void {
const line = this.buffer.lines.get(this.buffer.ybase + y); 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). * 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 x The column from which to start erasing to the start of the line.
* @param {number} y The line in which to operate. * @param y The line in which to operate.
*/ */
public eraseLeft(x: number, y: number): void { public eraseLeft(x: number, y: number): void {
const line = this.buffer.lines.get(this.buffer.ybase + y); 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 * 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 { public eraseLine(y: number): void {
this.eraseRight(0, y); 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 * Return the data array of a blank line
* @param {boolean} cur First bunch of data for each "blank" character. * @param cur First bunch of data for each "blank" character.
* @param {boolean} isWrapped Whether the new line is wrapped from the previous line. * @param 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 cols The number of columns in the terminal, if this is not
* set, the terminal's current column count would be used. * set, the terminal's current column count would be used.
*/ */
public blankLine(cur?: boolean, isWrapped?: boolean, cols?: number): LineData { 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. * 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 { public handler(data: string): void {
// Prevents all events to pty process if stdin is disabled // 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. * 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 { public handleTitle(title: string): void {
/** /**
+3 -3
View File
@@ -35,7 +35,7 @@ export function bracketTextForPaste(text: string, bracketedPasteMode: boolean):
/** /**
* Binds copy functionality to the given terminal. * 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 { export function copyHandler(ev: ClipboardEvent, term: ITerminal, selectionManager: ISelectionManager): void {
if (term.browser.isMSIE) { 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. * Redirect the clipboard's data to the terminal's input handler.
* @param {ClipboardEvent} ev The original paste event to be handled * @param ev The original paste event to be handled
* @param {Terminal} term The terminal on which to apply the handled paste event * @param term The terminal on which to apply the handled paste event
*/ */
export function pasteHandler(ev: ClipboardEvent, term: ITerminal): void { export function pasteHandler(ev: ClipboardEvent, term: ITerminal): void {
ev.stopPropagation(); ev.stopPropagation();
+2 -2
View File
@@ -174,8 +174,8 @@ export class Renderer extends EventEmitter implements IRenderer {
/** /**
* Queues a refresh between two rows (inclusive), to be done on next animation * Queues a refresh between two rows (inclusive), to be done on next animation
* frame. * frame.
* @param {number} start The start row. * @param start The start row.
* @param {number} end The end row. * @param end The end row.
*/ */
public refreshRows(start: number, end: number): void { public refreshRows(start: number, end: number): void {
if (this._isPaused) { if (this._isPaused) {
+2 -2
View File
@@ -22,8 +22,8 @@ export const isLinux = platform.indexOf('Linux') >= 0;
/** /**
* Return if the given array contains the given element * Return if the given array contains the given element
* @param {Array} array The array to search for the given element. * @param arr The array to search for the given element.
* @param {Object} el The element to look for into the array * @param el The element to look for into the array
*/ */
function contains(arr: any[], el: any): boolean { function contains(arr: any[], el: any): boolean {
return arr.indexOf(el) >= 0; return arr.indexOf(el) >= 0;