mirror of
https://github.com/yudai/gotty.git
synced 2026-02-12 11:24:21 +01:00
Fix typing of hterm
This commit is contained in:
parent
48c91151ad
commit
46a8b006f0
1 changed files with 6 additions and 12 deletions
18
js/typings/libapps/index.d.ts
vendored
18
js/typings/libapps/index.d.ts
vendored
|
|
@ -1,8 +1,9 @@
|
||||||
export namespace hterm {
|
export declare namespace hterm {
|
||||||
export interface Terminal {
|
export class Terminal {
|
||||||
io: IO;
|
io: IO;
|
||||||
onTerminalReady: () => void;
|
onTerminalReady: () => void;
|
||||||
|
|
||||||
|
constructor();
|
||||||
getPrefs(): Prefs;
|
getPrefs(): Prefs;
|
||||||
decorate(HTMLElement);
|
decorate(HTMLElement);
|
||||||
installKeyboard(): void;
|
installKeyboard(): void;
|
||||||
|
|
@ -12,13 +13,7 @@ export namespace hterm {
|
||||||
softReset(): void;
|
softReset(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TerminalConstructor {
|
export class IO {
|
||||||
new (): Terminal;
|
|
||||||
(): Terminal;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface IO {
|
|
||||||
writeUTF8: ((data: string) => void);
|
writeUTF8: ((data: string) => void);
|
||||||
writeUTF16: ((data: string) => void);
|
writeUTF16: ((data: string) => void);
|
||||||
onVTKeystroke: ((data: string) => void) | null;
|
onVTKeystroke: ((data: string) => void) | null;
|
||||||
|
|
@ -30,15 +25,14 @@ export namespace hterm {
|
||||||
showOverlay(message: string, timeout: number | null);
|
showOverlay(message: string, timeout: number | null);
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Prefs {
|
export class Prefs {
|
||||||
set(key: string, value: string): void;
|
set(key: string, value: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export var Terminal: TerminalConstructor;
|
|
||||||
export var defaultStorage: lib.Storage;
|
export var defaultStorage: lib.Storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
export namespace lib {
|
export declare namespace lib {
|
||||||
export interface Storage {
|
export interface Storage {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue