Create CoreTerminal, fix createInstance in strict mode
This commit is contained in:
@@ -9,7 +9,7 @@ import { IRenderDimensions, IRenderer, CharacterJoinerHandler } from 'browser/re
|
||||
import { IColorSet } from 'browser/Types';
|
||||
|
||||
export class MockCharSizeService implements ICharSizeService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
public get hasValidSize(): boolean { return this.width > 0 && this.height > 0; }
|
||||
public onCharSizeChange: IEvent<void> = new EventEmitter<void>().event;
|
||||
constructor(public width: number, public height: number) {}
|
||||
@@ -17,7 +17,7 @@ export class MockCharSizeService implements ICharSizeService {
|
||||
}
|
||||
|
||||
export class MockMouseService implements IMouseService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
public getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, isSelection?: boolean): [number, number] | undefined {
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
@@ -28,7 +28,7 @@ export class MockMouseService implements IMouseService {
|
||||
}
|
||||
|
||||
export class MockRenderService implements IRenderService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
public onDimensionsChange: IEvent<IRenderDimensions> = new EventEmitter<IRenderDimensions>().event;
|
||||
public onRenderedBufferChange: IEvent<{ start: number, end: number }, void> = new EventEmitter<{ start: number, end: number }>().event;
|
||||
public onRefreshRequest: IEvent<{ start: number, end: number}, void> = new EventEmitter<{ start: number, end: number }>().event;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { IEvent, EventEmitter } from 'common/EventEmitter';
|
||||
import { ICharSizeService } from 'browser/services/Services';
|
||||
|
||||
export class CharSizeService implements ICharSizeService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
|
||||
public width: number = 0;
|
||||
public height: number = 0;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { ICoreBrowserService } from './Services';
|
||||
|
||||
export class CoreBrowserService implements ICoreBrowserService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
private _textarea: HTMLTextAreaElement
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ICharSizeService, IRenderService, IMouseService } from './Services';
|
||||
import { getCoords, getRawByteCoords } from 'browser/input/Mouse';
|
||||
|
||||
export class MouseService implements IMouseService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@IRenderService private readonly _renderService: IRenderService,
|
||||
|
||||
@@ -14,7 +14,7 @@ import { IOptionsService } from 'common/services/Services';
|
||||
import { ICharSizeService, IRenderService } from 'browser/services/Services';
|
||||
|
||||
export class RenderService extends Disposable implements IRenderService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
|
||||
private _renderDebouncer: RenderDebouncer;
|
||||
private _screenDprMonitor: ScreenDprMonitor;
|
||||
|
||||
@@ -67,7 +67,7 @@ export const enum SelectionMode {
|
||||
* when the selection is ready to be redrawn (on an animation frame).
|
||||
*/
|
||||
export class SelectionService implements ISelectionService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
|
||||
protected _model: SelectionModel;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { IDisposable } from 'common/Types';
|
||||
|
||||
export const ICharSizeService = createDecorator<ICharSizeService>('CharSizeService');
|
||||
export interface ICharSizeService {
|
||||
serviceBrand: any;
|
||||
serviceBrand: undefined;
|
||||
|
||||
readonly width: number;
|
||||
readonly height: number;
|
||||
@@ -25,14 +25,14 @@ export interface ICharSizeService {
|
||||
|
||||
export const ICoreBrowserService = createDecorator<ICoreBrowserService>('CoreBrowserService');
|
||||
export interface ICoreBrowserService {
|
||||
serviceBrand: any;
|
||||
serviceBrand: undefined;
|
||||
|
||||
readonly isFocused: boolean;
|
||||
}
|
||||
|
||||
export const IMouseService = createDecorator<IMouseService>('MouseService');
|
||||
export interface IMouseService {
|
||||
serviceBrand: any;
|
||||
serviceBrand: undefined;
|
||||
|
||||
getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, isSelection?: boolean): [number, number] | undefined;
|
||||
getRawByteCoords(event: MouseEvent, element: HTMLElement, colCount: number, rowCount: number): { x: number, y: number } | undefined;
|
||||
@@ -40,7 +40,7 @@ export interface IMouseService {
|
||||
|
||||
export const IRenderService = createDecorator<IRenderService>('RenderService');
|
||||
export interface IRenderService extends IDisposable {
|
||||
serviceBrand: any;
|
||||
serviceBrand: undefined;
|
||||
|
||||
onDimensionsChange: IEvent<IRenderDimensions>;
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ export interface IRenderService extends IDisposable {
|
||||
|
||||
export const ISelectionService = createDecorator<ISelectionService>('SelectionService');
|
||||
export interface ISelectionService {
|
||||
serviceBrand: any;
|
||||
serviceBrand: undefined;
|
||||
|
||||
readonly selectionText: string;
|
||||
readonly hasSelection: boolean;
|
||||
@@ -100,7 +100,7 @@ export interface ISelectionService {
|
||||
|
||||
export const ISoundService = createDecorator<ISoundService>('SoundService');
|
||||
export interface ISoundService {
|
||||
serviceBrand: any;
|
||||
serviceBrand: undefined;
|
||||
|
||||
playBellSound(): void;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { IOptionsService } from 'common/services/Services';
|
||||
import { ISoundService } from 'browser/services/Services';
|
||||
|
||||
export class SoundService implements ISoundService {
|
||||
public serviceBrand: any;
|
||||
public serviceBrand: undefined;
|
||||
|
||||
private static _audioContext: AudioContext;
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
"common/*": [ "./common/*" ]
|
||||
}
|
||||
},
|
||||
"include": [ "./**/*" ],
|
||||
"include": [
|
||||
"./**/*",
|
||||
"../../typings/xterm.d.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../common" }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user