typing cleanup

This commit is contained in:
Eugene Pankov
2021-07-14 00:03:05 +02:00
parent e245629c5a
commit 57a198b082
16 changed files with 27 additions and 23 deletions

View File

@@ -49,7 +49,7 @@ export class TerminalStreamProcessor {
output: this.inputReadlineOutStream,
terminal: true,
prompt: this.options.inputMode === 'readline-hex' ? 'hex> ' : '> ',
} as any)
})
this.inputReadline.on('line', line => {
this.onTerminalInput(Buffer.from(line + '\n'))
this.resetInputPrompt()

View File

@@ -56,7 +56,7 @@ export class XTermFrontend extends Frontend {
allowTransparency: true,
windowsMode: process.platform === 'win32',
})
this.xtermCore = (this.xterm as any)._core
this.xtermCore = this.xterm['_core']
this.xterm.onBinary(data => {
this.input.next(Buffer.from(data, 'binary'))
@@ -365,7 +365,11 @@ export class XTermFrontend extends Frontend {
private getLineAsHTML (y: number, start: number, end: number): string {
let html = '<div>'
let lastStyle: string|null = null
const line = (this.xterm.buffer.active.getLine(y) as any)._line
const outerLine = this.xterm.buffer.active.getLine(y)
if (!outerLine) {
return ''
}
const line = outerLine['_line']
const cell = new CellData()
for (let i = start; i < end; i++) {
line.loadCell(i, cell)

View File

@@ -64,7 +64,7 @@ import { TerminalCLIHandler } from './cli'
AppearanceSettingsTabComponent,
ColorSchemeSettingsTabComponent,
TerminalSettingsTabComponent,
] as any[],
],
declarations: [
ColorPickerComponent,
ColorSchemePreviewComponent,
@@ -74,7 +74,7 @@ import { TerminalCLIHandler } from './cli'
SearchPanelComponent,
StreamProcessingSettingsComponent,
LoginScriptsSettingsComponent,
] as any[],
],
exports: [
ColorPickerComponent,
SearchPanelComponent,