Comparing version 0.0.17 to 0.0.18
@@ -21,5 +21,5 @@ import { IRouter, IRoute, IRouteTemplate, RouterContext, MappingFunction, IRouterOptions, IRouterNavigateOptions } from "./types"; | ||
navigate(path: string, options?: IRouterNavigateOptions): Promise<void>; | ||
goBack(options?: IRouterNavigateOptions): any; | ||
goBack(): boolean; | ||
private processPath(path); | ||
testPath(path: string): boolean; | ||
} |
@@ -100,19 +100,4 @@ "use strict"; | ||
}; | ||
Router.prototype.goBack = function (options) { | ||
var _this = this; | ||
if (options === void 0) { options = {}; } | ||
this.history.goBack(); | ||
var oldPath = this.history.currentPath; | ||
var result; | ||
if (!options.silent) { | ||
result = this.processPath(this.history.currentPath); | ||
} | ||
else { | ||
result = Promise.resolve(); | ||
} | ||
return result.then(function () { | ||
if (_this.onNavigate) { | ||
_this.onNavigate(oldPath, _this.history.currentPath); | ||
} | ||
}); | ||
Router.prototype.goBack = function () { | ||
return this.history.goBack(); | ||
}; | ||
@@ -119,0 +104,0 @@ Router.prototype.processPath = function (path) { |
@@ -26,2 +26,3 @@ /** | ||
testPath(path: string): boolean; | ||
goBack(): boolean; | ||
} | ||
@@ -28,0 +29,0 @@ export interface IRouteInfo { |
{ | ||
"name": "steersman", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "Lightweight JS router for browsers & node", | ||
@@ -5,0 +5,0 @@ "main": "lib/Router.js", |
Sorry, the diff of this file is not supported yet
105555
1008