diff --git a/mithril.d.ts b/mithril.d.ts index 3279b8cc..43575f08 100644 --- a/mithril.d.ts +++ b/mithril.d.ts @@ -83,16 +83,19 @@ interface MithrilEvent { } interface MithrilController { - (): any; onunload?(evt: Event): any; } +interface MithrilControllerFunction extends MithrilController { + (): any; +} + interface MithrilView { (ctrl: T): string|MithrilVirtualElement; } interface MithrilModule { - controller: T; + controller: MithrilControllerFunction|{ new(): T }; view: MithrilView; }