feat(router): make it work with TypeScript 1.8

This commit is contained in:
vsavkin
2016-06-15 09:14:41 -07:00
parent 3683fb6886
commit b3e801ed9e
13 changed files with 39 additions and 38 deletions

View File

@ -118,7 +118,7 @@ function match(segment: UrlSegment, route: Route, paths: UrlPathWithParams[]) {
const path = route.path.startsWith('/') ? route.path.substring(1) : route.path;
const parts = path.split('/');
const posParameters = {};
const posParameters: {[key: string]: any} = {};
const consumedPaths = [];
let currentIndex = 0;
@ -142,7 +142,7 @@ function match(segment: UrlSegment, route: Route, paths: UrlPathWithParams[]) {
throw new NoMatch();
}
const parameters = <any>merge(posParameters, consumedPaths[consumedPaths.length - 1].parameters);
const parameters = merge(posParameters, consumedPaths[consumedPaths.length - 1].parameters);
return {consumedPaths, lastChild: currentIndex, parameters};
}