From ea8853eec244d592dfe82c520526b3d0496ac76d Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Tue, 28 Apr 2015 22:48:31 -0400 Subject: [PATCH] fix compile errors in ts file --- mithril.d.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mithril.d.ts b/mithril.d.ts index 784ea6bb..c9763a96 100644 --- a/mithril.d.ts +++ b/mithril.d.ts @@ -2,8 +2,8 @@ declare module _mithril { interface MithrilStatic { - (selector: string, attributes: MithrilAttributes, ...children: Array): MithrilVirtualElement; - (selector: string, ...children: Array): MithrilVirtualElement; + (selector: string, attributes: MithrilAttributes, ...children: Array>): MithrilVirtualElement; + (selector: string, ...children: Array>): MithrilVirtualElement; prop(promise: MithrilPromise) : MithrilPromiseProperty; prop(value: T): MithrilProperty; @@ -11,9 +11,13 @@ declare module _mithril { withAttr(property: string, callback: (value: any) => void): (e: MithrilEvent) => any; - module(rootElement: Node, module: MithrilModule): T; + module(rootElement: Node, component: MithrilComponent): T; module(rootElement: Node): T; + mount(rootElement: Node, component: MithrilComponent): T; + mount(rootElement: Node): T; + component(component: MithrilComponent, ...args: Array): MithrilComponent + trust(html: string): string; render(rootElement: Element|HTMLDocument): void; @@ -96,7 +100,7 @@ declare module _mithril { (ctrl: T): string|MithrilVirtualElement; } - interface MithrilModule { + interface MithrilComponent { controller: MithrilControllerFunction|{ new(): T }; view: MithrilView; } @@ -114,7 +118,7 @@ declare module _mithril { } interface MithrilRoutes { - [key: string]: MithrilModule; + [key: string]: MithrilComponent; }