refactor(TypeScript): Add noImplicitAny

We automatically insert explicit 'any's where needed. These need to be
addressed as in #9100.

Fixes #4924
This commit is contained in:
ScottSWu
2016-06-08 15:45:15 -07:00
parent 87d824e1b4
commit 86fbd50c3d
305 changed files with 2338 additions and 2337 deletions

View File

@ -32,7 +32,7 @@ function _recognize(componentResolver: ComponentResolver, parentComponent: Type,
`Component '${stringify(parentComponent)}' does not have route configuration`);
}
let match;
let match: any /** TODO #9100 */;
try {
match = _match(metadata, url);
} catch (e) {
@ -146,7 +146,7 @@ function _matchWithParts(route: RouteMetadata, url: TreeNode<UrlSegment>): _Matc
let parts = path.split("/");
let positionalParams = {};
let consumedUrlSegments = [];
let consumedUrlSegments: any[] /** TODO #9100 */ = [];
let lastParent: TreeNode<UrlSegment> = null;
let lastSegment: TreeNode<UrlSegment> = null;
@ -169,7 +169,7 @@ function _matchWithParts(route: RouteMetadata, url: TreeNode<UrlSegment>): _Matc
}
if (isPosParam) {
positionalParams[p.substring(1)] = current.value.segment;
(positionalParams as any /** TODO #9100 */)[p.substring(1)] = current.value.segment;
}
consumedUrlSegments.push(current.value);
@ -188,13 +188,13 @@ function _matchWithParts(route: RouteMetadata, url: TreeNode<UrlSegment>): _Matc
function _checkOutletNameUniqueness(nodes: TreeNode<RouteSegment>[]): TreeNode<RouteSegment>[] {
let names = {};
nodes.forEach(n => {
let segmentWithSameOutletName = names[n.value.outlet];
let segmentWithSameOutletName = (names as any /** TODO #9100 */)[n.value.outlet];
if (isPresent(segmentWithSameOutletName)) {
let p = segmentWithSameOutletName.stringifiedUrlSegments;
let c = n.value.stringifiedUrlSegments;
throw new BaseException(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);
}
names[n.value.outlet] = n.value;
(names as any /** TODO #9100 */)[n.value.outlet] = n.value;
});
return nodes;
}