gotty/js/typings/libapps/index.d.ts

52 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

2017-08-23 01:56:34 +00:00
export declare namespace hterm {
export class Terminal {
2017-08-22 07:16:28 +00:00
io: IO;
onTerminalReady: () => void;
2017-08-23 01:56:34 +00:00
constructor();
2017-08-22 07:16:28 +00:00
getPrefs(): Prefs;
decorate(HTMLElement);
installKeyboard(): void;
uninstallKeyboard(): void;
setWindowTitle(title: string): void;
reset(): void;
softReset(): void;
}
2017-08-23 01:56:34 +00:00
export class IO {
2017-08-22 07:16:28 +00:00
writeUTF8: ((data: string) => void);
writeUTF16: ((data: string) => void);
onVTKeystroke: ((data: string) => void) | null;
sendString: ((data: string) => void) | null;
onTerminalResize: ((columns: number, rows: number) => void) | null;
push(): IO;
writeUTF(data: string);
showOverlay(message: string, timeout: number | null);
}
2017-08-23 01:56:34 +00:00
export class Prefs {
2017-08-22 07:16:28 +00:00
set(key: string, value: string): void;
}
export var defaultStorage: lib.Storage;
}
2017-08-23 01:56:34 +00:00
export declare namespace lib {
2017-08-22 07:16:28 +00:00
export interface Storage {
}
export interface Memory {
new (): Storage;
Memory(): Storage
}
export var Storage: {
Memory: Memory
}
2017-08-23 06:32:12 +00:00
export class UTF8Decoder {
decode(str: string)
}
2017-08-22 07:16:28 +00:00
}