mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix most errors in Terminal.ts
This commit is contained in:
+4
-2
@@ -2,17 +2,19 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Charset } from './Types';
|
||||
|
||||
/**
|
||||
* The character sets supported by the terminal. These enable several languages
|
||||
* to be represented within the terminal with only 8-bit encoding. See ISO 2022
|
||||
* for a discussion on character sets. Only VT100 character sets are supported.
|
||||
*/
|
||||
export const CHARSETS: {[key: string]: {[key: string]: string}} = {};
|
||||
export const CHARSETS: { [key: string]: Charset } = {};
|
||||
|
||||
/**
|
||||
* The default character set, US.
|
||||
*/
|
||||
export const DEFAULT_CHARSET = CHARSETS['B'];
|
||||
export const DEFAULT_CHARSET: Charset = CHARSETS['B'];
|
||||
|
||||
/**
|
||||
* DEC Special Character and Line Drawing Set.
|
||||
|
||||
@@ -68,4 +68,8 @@ export class EventEmitter implements IEventEmitter {
|
||||
public listeners(type): ListenerType[] {
|
||||
return this._events[type] || [];
|
||||
}
|
||||
|
||||
protected destroy(): void {
|
||||
this._events = {};
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -92,8 +92,8 @@ export interface ILinkifier {
|
||||
export interface ICircularList<T> extends IEventEmitter {
|
||||
length: number;
|
||||
maxLength: number;
|
||||
forEach: (callbackfn: (value: T, index: number) => void) => void;
|
||||
|
||||
forEach(callbackfn: (value: T, index: number, array: T[]) => void): void;
|
||||
get(index: number): T;
|
||||
set(index: number, value: T): void;
|
||||
push(value: T): void;
|
||||
|
||||
+2138
-2134
File diff suppressed because it is too large
Load Diff
@@ -12,3 +12,8 @@ export type LinkMatcher = {
|
||||
};
|
||||
export type LinkMatcherHandler = (event: MouseEvent, uri: string) => boolean | void;
|
||||
export type LinkMatcherValidationCallback = (uri: string, element: HTMLElement, callback: (isValid: boolean) => void) => void;
|
||||
|
||||
// TODO: Make this type more specific
|
||||
export type TerminalOptions = {[key: string]: any};
|
||||
export type CustomKeyEventHandler = (event: KeyboardEvent) => boolean;
|
||||
export type Charset = {[key: string]: string};
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
import { EventEmitter } from '../EventEmitter';
|
||||
import { ICircularList } from '../Interfaces';
|
||||
|
||||
export class CircularList<T> extends EventEmitter {
|
||||
export class CircularList<T> extends EventEmitter implements ICircularList<T> {
|
||||
private _array: T[];
|
||||
private _startIndex: number;
|
||||
private _length: number;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import { Terminal } from './Terminal';
|
||||
|
||||
module.exports = Terminal;
|
||||
Reference in New Issue
Block a user