Merge pull request #368 from blacha/next

Updating typescript route definition to allow m.route.mode and m.route.param(key).
This commit is contained in:
Leo Horie 2014-12-02 19:06:37 -05:00
commit 4d3430bf2b

16
mithril.d.ts vendored
View file

@ -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;
}