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:
commit
4d3430bf2b
1 changed files with 10 additions and 6 deletions
16
mithril.d.ts
vendored
16
mithril.d.ts
vendored
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue