From 7948ef9be5fd2e7c75320f54b40141707f0235f8 Mon Sep 17 00:00:00 2001 From: Chris Bowdon Date: Sun, 7 Sep 2014 18:00:39 +0800 Subject: [PATCH 1/2] TypeScript defs: added return types where missing from MithrilXHROptions. --- mithril.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mithril.d.ts b/mithril.d.ts index 7b2c4cef..ce62806f 100644 --- a/mithril.d.ts +++ b/mithril.d.ts @@ -55,10 +55,10 @@ interface MithrilXHROptions { unwrapError?(data: any): any; serialize?(dataToSerialize: any): string; deserialize?(dataToDeserialize: string): any; - extract?(xhr: XMLHttpRequest, options: MithrilXHROptions); + extract?(xhr: XMLHttpRequest, options: MithrilXHROptions): string; type?(data: Object): void; - config?(xhr: XMLHttpRequest, options: MithrilXHROptions) + config?(xhr: XMLHttpRequest, options: MithrilXHROptions): XMLHttpRequest; } declare var Mithril: MithrilStatic; -declare var m: MithrilStatic; \ No newline at end of file +declare var m: MithrilStatic; From b7cdeaf46e4d412716c8166f98d1d520623f6df7 Mon Sep 17 00:00:00 2001 From: Chris Bowdon Date: Mon, 8 Sep 2014 08:21:47 +0800 Subject: [PATCH 2/2] TypeScript defs: module can actually take a Node --- mithril.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.d.ts b/mithril.d.ts index ce62806f..1bc1f888 100644 --- a/mithril.d.ts +++ b/mithril.d.ts @@ -5,7 +5,7 @@ interface MithrilStatic { (selector: string, children?: any): MithrilVirtualElement; prop(value?: any): (value?: any) => any; withAttr(property: string, callback: (value: any) => void): (e: Event) => any; - module(rootElement: Element, module: MithrilModule): void; + module(rootElement: Node, module: MithrilModule): void; trust(html: string): String; render(rootElement: Element, children?: any): void; render(rootElement: HTMLDocument, children?: any): void;