mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
pathjs: various small fixes
This commit is contained in:
Vendored
+10
-6
@@ -3,6 +3,10 @@
|
||||
// Definitions by: Lokesh Peta <https://github.com/lokeshpeta>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface IDictionary<T> {
|
||||
[id: string]: T;
|
||||
}
|
||||
|
||||
interface IPathHistory{
|
||||
initial: any;
|
||||
pushState(state: any, title: string, path: string):void;
|
||||
@@ -19,11 +23,11 @@ interface IPathRoute{
|
||||
}
|
||||
|
||||
interface IPathRoutes{
|
||||
current: IPathRoute,
|
||||
root: IPathRoute,
|
||||
rescue: Function,
|
||||
previous: IPathRoute,
|
||||
defined: {}
|
||||
current?: string,
|
||||
root?: string,
|
||||
rescue?: Function,
|
||||
previous?: string,
|
||||
defined: IDictionary<IPathRoute>
|
||||
}
|
||||
|
||||
interface IPathCore{
|
||||
@@ -43,7 +47,7 @@ interface IPath {
|
||||
|
||||
history: IPathHistory;
|
||||
|
||||
match(path: string, parameterize: boolean): IPathRoute;
|
||||
match(path: string, parameterize: boolean): IPathRoute | null;
|
||||
|
||||
dispatch(passed_route: string): void;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
import {Path} from "./index";
|
||||
|
||||
Path.map("/test/:id")
|
||||
.to(()=>{ });
|
||||
@@ -30,4 +30,4 @@ var funs = new Array<Function>();
|
||||
funs.push(test1);
|
||||
funs.push(test2);
|
||||
|
||||
route.enter(funs);
|
||||
route.enter(funs);
|
||||
|
||||
Reference in New Issue
Block a user