From 5b71027896532a4c1c55a105bcb485046b713a6f Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Wed, 3 Dec 2014 11:28:50 +1300 Subject: [PATCH] Updating typescript route definition to allow m.route.mode and m.route.param(key). --- mithril.d.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mithril.d.ts b/mithril.d.ts index a3f6ae18..717980c1 100644 --- a/mithril.d.ts +++ b/mithril.d.ts @@ -10,11 +10,15 @@ interface MithrilStatic { render(rootElement: Element, children?: any): void; render(rootElement: HTMLDocument, children?: any): void; redraw(): void; - route(rootElement: Element, defaultRoute: string, routes: { [key: string]: MithrilModule }): void; - route(rootElement: HTMLDocument, defaultRoute: string, routes: { [key: string]: MithrilModule }): void; - route(path: string, params?: any, shouldReplaceHistory?: boolean): void; - route(): string; - route(element: Element, isInitialized: boolean): void; + route: { + (rootElement:Element, defaultRoute:string, routes:{ [key: string]: MithrilModule }): void + (element: Element, isInitialized: boolean): void; + (rootElement:HTMLDocument, defaultRoute:string, routes:{ [key: string]: MithrilModule }): void; + (path:string, params?:any, shouldReplaceHistory?:boolean): void; + (): string; + param(key:string): string; + mode: string; + }; request(options: MithrilXHROptions): MithrilPromise; deferred(): MithrilDeferred; sync(promises: MithrilPromise[]): MithrilPromise; @@ -65,5 +69,5 @@ declare var Mithril: MithrilStatic; declare var m: MithrilStatic; declare module 'mithril' { - export = MithrilStatic; + export = MithrilStatic; }