Skip to content

Commit

Permalink
Fix typing of hterm
Browse files Browse the repository at this point in the history
  • Loading branch information
yudai committed Aug 23, 2017
1 parent 48c9115 commit 46a8b00
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions js/typings/libapps/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
export namespace hterm {
export interface Terminal {
export declare namespace hterm {
export class Terminal {
io: IO;
onTerminalReady: () => void;

constructor();
getPrefs(): Prefs;
decorate(HTMLElement);
installKeyboard(): void;
Expand All @@ -12,13 +13,7 @@ export namespace hterm {
softReset(): void;
}

export interface TerminalConstructor {
new (): Terminal;
(): Terminal;
}


export interface IO {
export class IO {
writeUTF8: ((data: string) => void);
writeUTF16: ((data: string) => void);
onVTKeystroke: ((data: string) => void) | null;
Expand All @@ -30,15 +25,14 @@ export namespace hterm {
showOverlay(message: string, timeout: number | null);
}

export interface Prefs {
export class Prefs {
set(key: string, value: string): void;
}

export var Terminal: TerminalConstructor;
export var defaultStorage: lib.Storage;
}

export namespace lib {
export declare namespace lib {
export interface Storage {
}

Expand Down

0 comments on commit 46a8b00

Please sign in to comment.