Skip to content

Commit

Permalink
aligned router api with 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nippur72 committed Nov 29, 2015
1 parent 5810f47 commit e659aad
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
12 changes: 8 additions & 4 deletions riot-ts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ declare module Riot {
constructor();
}
interface Router {
(callback: Function): any;
(to: string): any;
start(): any;
(callback: Function): void;
(filter: string, callback: Function): void;
(to: string, title?: string): any;
create(): Router;
start(autoExec?: boolean): any;
stop(): any;
exec(callback: Function): any;
parser(parser: Function): any;
query(): any;
base(base: string): any;
parser(parser: (path: string) => string, secondParser?: Function): any;
}
interface CompilerResult {
tagName: string;
Expand Down
2 changes: 1 addition & 1 deletion riot-ts.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions riot-ts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,21 @@
constructor() {
riot.observable(this);
}
}
}

export interface Router {
(callback: Function);
(to: string);
(callback: Function): void;
(filter: string, callback: Function): void;
(to: string, title?: string);

start();
create(): Router;
start(autoExec?: boolean);
stop();
exec(callback: Function);
parser(parser: Function);
query(): any;

base(base: string);
parser(parser: (path: string)=>string, secondParser?: Function );
}

export interface CompilerResult
Expand Down

0 comments on commit e659aad

Please sign in to comment.