diff --git a/pkg/interface/src/types/term-update.ts b/pkg/interface/src/types/term-update.ts index 3f85136539..2e9f09ba8c 100644 --- a/pkg/interface/src/types/term-update.ts +++ b/pkg/interface/src/types/term-update.ts @@ -10,22 +10,22 @@ export type Tint = export type Deco = null | 'br' | 'un' | 'bl'; export type Stye = { - deco: Array, + deco: Deco[], back: Tint, fore: Tint }; export type Stub = { stye: Stye, - text: Array + text: string[] } export type Blit = | { bel: null } // make a noise | { clr: null } // clear the screen | { hop: number | { r: number, c: number } } // set cursor col/pos - | { klr: Array } // put styled - | { put: Array } // put text at cursor + | { klr: Stub[] } // put styled + | { put: string[] } // put text at cursor | { nel: null } // newline | { sag: { path: string, file: string } } // save to jamfile | { sav: { path: string, file: string } } // save to file diff --git a/pkg/interface/src/views/apps/term/app.tsx b/pkg/interface/src/views/apps/term/app.tsx index 82dd5f2e7f..b5ebe7200e 100644 --- a/pkg/interface/src/views/apps/term/app.tsx +++ b/pkg/interface/src/views/apps/term/app.tsx @@ -67,7 +67,7 @@ const termConfig: ITerminalOptions = { macOptionClickForcesSelection: true, } -const csi = (cmd: string, ...args: Array) => { +const csi = (cmd: string, ...args: number[]) => { return '\x1b[' + args.join(';') + cmd; } @@ -92,7 +92,7 @@ const stye = (s: Stye) => { // text decorations // if (s.deco.length > 0) { - out += s.deco.reduce((decs: Array, deco: Deco) => { + out += s.deco.reduce((decs: number[], deco: Deco) => { switch (deco) { case null: decs.push(0); return decs; case 'br': decs.push(1); return decs; @@ -258,7 +258,7 @@ export default function TermApp(props: TermAppProps) { const onInput = useCallback((ses: string, e: string) => { const term = useTermState.getState().sessions[ses].term; - let belts: Array = []; + let belts: Belt[] = []; let strap = ''; while (e.length > 0) {