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

@ -28,26 +28,26 @@ import {
import {TEST_ROUTER_PROVIDERS, RootCmp, compile} from './util';
var cmpInstanceCount;
var childCmpInstanceCount;
var cmpInstanceCount: any /** TODO #9100 */;
var childCmpInstanceCount: any /** TODO #9100 */;
export function main() {
describe('navigation', () => {
var tcb: TestComponentBuilder;
var fixture: ComponentFixture<any>;
var rtr;
var rtr: any /** TODO #9100 */;
beforeEachProviders(() => TEST_ROUTER_PROVIDERS);
beforeEach(inject([TestComponentBuilder, Router], (tcBuilder, router) => {
beforeEach(inject([TestComponentBuilder, Router], (tcBuilder: any /** TODO #9100 */, router: any /** TODO #9100 */) => {
tcb = tcBuilder;
rtr = router;
childCmpInstanceCount = 0;
cmpInstanceCount = 0;
}));
it('should work in a simple case', inject([AsyncTestCompleter], (async) => {
it('should work in a simple case', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new Route({path: '/test', component: HelloCmp})]))
@ -61,7 +61,7 @@ export function main() {
it('should navigate between components with different parameters',
inject([AsyncTestCompleter], (async) => {
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new Route({path: '/user/:name', component: UserCmp})]))
@ -78,7 +78,7 @@ export function main() {
});
}));
it('should navigate to child routes', inject([AsyncTestCompleter], (async) => {
it('should navigate to child routes', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, 'outer { <router-outlet></router-outlet> }')
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new Route({path: '/a/...', component: ParentCmp})]))
@ -91,7 +91,7 @@ export function main() {
}));
it('should navigate to child routes that capture an empty path',
inject([AsyncTestCompleter], (async) => {
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, 'outer { <router-outlet></router-outlet> }')
.then((rtc) => {fixture = rtc})
@ -105,7 +105,7 @@ export function main() {
}));
it('should navigate to child routes when the root component has an empty path',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, 'outer { <router-outlet></router-outlet> }')
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new Route({path: '/...', component: ParentCmp})]))
@ -118,7 +118,7 @@ export function main() {
});
}));
it('should navigate to child routes of async routes', inject([AsyncTestCompleter], (async) => {
it('should navigate to child routes of async routes', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, 'outer { <router-outlet></router-outlet> }')
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new AsyncRoute({path: '/a/...', loader: parentLoader})]))
@ -132,7 +132,7 @@ export function main() {
it('should replace state when normalized paths are equal',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => location.setInitialPath("/test/"))
@ -146,7 +146,7 @@ export function main() {
});
}));
it('should reuse common parent components', inject([AsyncTestCompleter], (async) => {
it('should reuse common parent components', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new Route({path: '/team/:id/...', component: TeamCmp})]))
@ -167,7 +167,7 @@ export function main() {
}));
it('should not reuse children when parent components change',
inject([AsyncTestCompleter], (async) => {
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new Route({path: '/team/:id/...', component: TeamCmp})]))
@ -188,7 +188,7 @@ export function main() {
});
}));
it('should inject route data into component', inject([AsyncTestCompleter], (async) => {
it('should inject route data into component', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -203,7 +203,7 @@ export function main() {
}));
it('should inject route data into component with AsyncRoute',
inject([AsyncTestCompleter], (async) => {
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -219,7 +219,7 @@ export function main() {
}));
it('should inject empty object if the route has no data property',
inject([AsyncTestCompleter], (async) => {
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -233,7 +233,7 @@ export function main() {
}));
it('should fire an event for each activated component',
inject([AsyncTestCompleter], (async) => {
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, '<router-outlet (activate)="activatedCmp = $event"></router-outlet>')
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new Route({path: '/test', component: HelloCmp})]))