Ensure types are checked in demo, fix errors, emit to out-demo
Part of #5509
This commit is contained in:
@@ -3,13 +3,10 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/// <reference path="../../../typings/xterm.d.ts"/>
|
||||
|
||||
import type { Terminal } from '@xterm/xterm';
|
||||
import { BaseWindow } from './baseWindow';
|
||||
import type { IControlWindow } from '../controlBar';
|
||||
import type { AddonCollection } from 'types';
|
||||
import type { IImageAddonOptions } from '@xterm/addon-image';
|
||||
import type { AddonCollection } from '../../types';
|
||||
|
||||
export class AddonsWindow extends BaseWindow implements IControlWindow {
|
||||
public readonly id = 'addons';
|
||||
@@ -277,4 +274,4 @@ function htmlSerializeButtonHandler(term: Terminal, addons: AddonCollection): vo
|
||||
document.execCommand('copy');
|
||||
document.removeEventListener('copy', listener);
|
||||
document.getElementById('htmlserialize-output-result').innerText = 'Copied to clipboard';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,27 +3,25 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/// <reference path="../../../typings/xterm.d.ts"/>
|
||||
|
||||
import type { AddonCollection } from '../../types';
|
||||
import type { IControlWindow } from '../controlBar';
|
||||
import type { Terminal } from '@xterm/xterm';
|
||||
|
||||
export abstract class BaseWindow implements IControlWindow {
|
||||
protected get _terminal(): Terminal { return this.__terminal; }
|
||||
protected get _terminal(): Terminal { return this._terminalPrivate; }
|
||||
|
||||
constructor(
|
||||
private __terminal: Terminal,
|
||||
protected readonly _addons: AddonCollection,
|
||||
) {
|
||||
constructor(
|
||||
private _terminalPrivate: Terminal,
|
||||
protected readonly _addons: AddonCollection,
|
||||
) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
setTerminal(terminal: Terminal): void {
|
||||
this.__terminal = terminal;
|
||||
}
|
||||
public setTerminal(terminal: Terminal): void {
|
||||
this._terminalPrivate = terminal;
|
||||
}
|
||||
|
||||
abstract id: string;
|
||||
abstract label: string;
|
||||
abstract build(container: HTMLElement): void;
|
||||
}
|
||||
public abstract id: string;
|
||||
public abstract label: string;
|
||||
public abstract build(container: HTMLElement): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user