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

@ -38,18 +38,18 @@ function getLinkElement(rtc: ComponentFixture<any>) {
}
function asyncRoutesWithoutChildrenWithRouteData() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should inject route data into the component', inject([AsyncTestCompleter], (async) => {
it('should inject route data into the component', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -65,7 +65,7 @@ function asyncRoutesWithoutChildrenWithRouteData() {
}));
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(
@ -80,18 +80,18 @@ function asyncRoutesWithoutChildrenWithRouteData() {
}
function asyncRoutesWithoutChildrenWithoutParams() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -104,7 +104,7 @@ function asyncRoutesWithoutChildrenWithoutParams() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -117,7 +117,7 @@ function asyncRoutesWithoutChildrenWithoutParams() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Hello']">go to hello</a> | <router-outlet></router-outlet>`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -130,7 +130,7 @@ function asyncRoutesWithoutChildrenWithoutParams() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Hello']">go to hello</a> | <router-outlet></router-outlet>`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -139,7 +139,7 @@ function asyncRoutesWithoutChildrenWithoutParams() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('go to hello | ');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('go to hello | hello');
expect(location.urlChanges).toEqual(['/test']);
@ -153,18 +153,18 @@ function asyncRoutesWithoutChildrenWithoutParams() {
function asyncRoutesWithoutChildrenWithParams() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -177,7 +177,7 @@ function asyncRoutesWithoutChildrenWithParams() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -190,7 +190,7 @@ function asyncRoutesWithoutChildrenWithParams() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['User', {name: 'naomi'}]">greet naomi</a> | <router-outlet></router-outlet>`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -203,7 +203,7 @@ function asyncRoutesWithoutChildrenWithParams() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['User', {name: 'naomi'}]">greet naomi</a> | <router-outlet></router-outlet>`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -212,7 +212,7 @@ function asyncRoutesWithoutChildrenWithParams() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('greet naomi | ');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('greet naomi | hello naomi');
expect(location.urlChanges).toEqual(['/user/naomi']);
@ -224,7 +224,7 @@ function asyncRoutesWithoutChildrenWithParams() {
}));
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(
@ -245,18 +245,18 @@ function asyncRoutesWithoutChildrenWithParams() {
function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -269,7 +269,7 @@ function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -282,7 +282,7 @@ function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Parent']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -295,7 +295,7 @@ function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -304,7 +304,7 @@ function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('nav to child | outer { }');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement)
.toHaveText('nav to child | outer { inner { hello } }');
@ -319,18 +319,18 @@ function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -344,7 +344,7 @@ function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -358,7 +358,7 @@ function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['/Parent']">link to inner</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -372,7 +372,7 @@ function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['/Parent']">link to inner</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -382,7 +382,7 @@ function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('link to inner | outer { }');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement)
.toHaveText('link to inner | outer { inner { hello } }');
@ -397,18 +397,18 @@ function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
var rootTC;
var tcb;
var rtr;
var rootTC: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {rootTC = rtc})
.then((_) => rtr.config([
@ -422,7 +422,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {rootTC = rtc})
.then((_) => rtr.config([
@ -436,7 +436,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {rootTC = rtc})
.then((_) => rtr.config([
@ -450,7 +450,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {rootTC = rtc})
.then((_) => rtr.config([
@ -460,7 +460,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement).toHaveText('nav to child | outer { }');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement)
.toHaveText('nav to child | outer { inner { hello } }');
@ -475,18 +475,18 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
var rootTC;
var tcb;
var rtr;
var rootTC: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {rootTC = rtc})
.then((_) => rtr.config([
@ -501,7 +501,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {rootTC = rtc})
.then((_) => rtr.config([
@ -516,7 +516,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Parent']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {rootTC = rtc})
.then((_) => rtr.config([
@ -531,7 +531,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Parent']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {rootTC = rtc})
.then((_) => rtr.config([
@ -542,7 +542,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement).toHaveText('nav to child | outer { }');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement)
.toHaveText('nav to child | outer { inner { hello } }');
@ -557,18 +557,18 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `{ <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -583,7 +583,7 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `{ <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -598,7 +598,7 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(
tcb,
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> { <router-outlet></router-outlet> }`)
@ -614,7 +614,7 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(
tcb,
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> { <router-outlet></router-outlet> }`)
@ -626,7 +626,7 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('nav to matias { }');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement)
.toHaveText('nav to matias { team angular | user { hello matias } }');
@ -640,17 +640,17 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
}
export function registerSpecs() {
specs['asyncRoutesWithoutChildrenWithRouteData'] = asyncRoutesWithoutChildrenWithRouteData;
specs['asyncRoutesWithoutChildrenWithoutParams'] = asyncRoutesWithoutChildrenWithoutParams;
specs['asyncRoutesWithoutChildrenWithParams'] = asyncRoutesWithoutChildrenWithParams;
specs['asyncRoutesWithSyncChildrenWithoutDefaultRoutes'] =
(specs as any /** TODO #9100 */)['asyncRoutesWithoutChildrenWithRouteData'] = asyncRoutesWithoutChildrenWithRouteData;
(specs as any /** TODO #9100 */)['asyncRoutesWithoutChildrenWithoutParams'] = asyncRoutesWithoutChildrenWithoutParams;
(specs as any /** TODO #9100 */)['asyncRoutesWithoutChildrenWithParams'] = asyncRoutesWithoutChildrenWithParams;
(specs as any /** TODO #9100 */)['asyncRoutesWithSyncChildrenWithoutDefaultRoutes'] =
asyncRoutesWithSyncChildrenWithoutDefaultRoutes;
specs['asyncRoutesWithSyncChildrenWithDefaultRoutes'] =
(specs as any /** TODO #9100 */)['asyncRoutesWithSyncChildrenWithDefaultRoutes'] =
asyncRoutesWithSyncChildrenWithDefaultRoutes;
specs['asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes'] =
(specs as any /** TODO #9100 */)['asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes'] =
asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes;
specs['asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes'] =
(specs as any /** TODO #9100 */)['asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes'] =
asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes;
specs['asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes'] =
(specs as any /** TODO #9100 */)['asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes'] =
asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes;
}

View File

@ -27,14 +27,14 @@ function getLinkElement(rtc: ComponentFixture<any>, linkIndex: number = 0) {
function auxRoutes() {
var tcb: TestComponentBuilder;
var fixture: ComponentFixture<any>;
var rtr;
var rtr: any /** TODO #9100 */;
beforeEach(inject([TestComponentBuilder, Router], (tcBuilder, router) => {
beforeEach(inject([TestComponentBuilder, Router], (tcBuilder: any /** TODO #9100 */, router: any /** TODO #9100 */) => {
tcb = tcBuilder;
rtr = router;
}));
it('should recognize and navigate from the URL', inject([AsyncTestCompleter], (async) => {
it('should recognize and navigate from the URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -49,7 +49,7 @@ function auxRoutes() {
});
}));
it('should navigate via the link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate via the link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -64,7 +64,7 @@ function auxRoutes() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(
tcb,
`<a [routerLink]="['/', ['Modal']]">open modal</a> | main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
@ -81,7 +81,7 @@ function auxRoutes() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(
tcb,
`<a [routerLink]="['/', ['Modal']]">open modal</a> | <a [routerLink]="['/Hello']">hello</a> | main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
@ -97,7 +97,7 @@ function auxRoutes() {
var navCount = 0;
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
navCount += 1;
fixture.detectChanges();
if (navCount == 1) {
@ -130,14 +130,14 @@ function auxRoutes() {
function auxRoutesWithAPrimaryRoute() {
var tcb: TestComponentBuilder;
var fixture: ComponentFixture<any>;
var rtr;
var rtr: any /** TODO #9100 */;
beforeEach(inject([TestComponentBuilder, Router], (tcBuilder, router) => {
beforeEach(inject([TestComponentBuilder, Router], (tcBuilder: any /** TODO #9100 */, router: any /** TODO #9100 */) => {
tcb = tcBuilder;
rtr = router;
}));
it('should recognize and navigate from the URL', inject([AsyncTestCompleter], (async) => {
it('should recognize and navigate from the URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -152,7 +152,7 @@ function auxRoutesWithAPrimaryRoute() {
});
}));
it('should navigate via the link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate via the link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([
@ -167,7 +167,7 @@ function auxRoutesWithAPrimaryRoute() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(
tcb,
`<a [routerLink]="['/Hello', ['Modal']]">open modal</a> | main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
@ -184,7 +184,7 @@ function auxRoutesWithAPrimaryRoute() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(
tcb,
`<a [routerLink]="['/Hello', ['Modal']]">open modal</a> | main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
@ -197,7 +197,7 @@ function auxRoutesWithAPrimaryRoute() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('open modal | main {} | aux {}');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement)
.toHaveText('open modal | main {hello} | aux {modal}');
@ -211,8 +211,8 @@ function auxRoutesWithAPrimaryRoute() {
}
export function registerSpecs() {
specs['auxRoutes'] = auxRoutes;
specs['auxRoutesWithAPrimaryRoute'] = auxRoutesWithAPrimaryRoute;
(specs as any /** TODO #9100 */)['auxRoutes'] = auxRoutes;
(specs as any /** TODO #9100 */)['auxRoutesWithAPrimaryRoute'] = auxRoutesWithAPrimaryRoute;
}

View File

@ -30,18 +30,18 @@ function getLinkElement(rtc: ComponentFixture<any>) {
}
function syncRoutesWithoutChildrenWithoutParams() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) =>
@ -54,7 +54,7 @@ function syncRoutesWithoutChildrenWithoutParams() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) =>
@ -67,7 +67,7 @@ function syncRoutesWithoutChildrenWithoutParams() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Hello']">go to hello</a> | <router-outlet></router-outlet>`)
.then((rtc) => {fixture = rtc})
.then((_) =>
@ -80,7 +80,7 @@ function syncRoutesWithoutChildrenWithoutParams() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Hello']">go to hello</a> | <router-outlet></router-outlet>`)
.then((rtc) => {fixture = rtc})
.then((_) =>
@ -89,7 +89,7 @@ function syncRoutesWithoutChildrenWithoutParams() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('go to hello | ');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('go to hello | hello');
expect(location.urlChanges).toEqual(['/test']);
@ -103,18 +103,18 @@ function syncRoutesWithoutChildrenWithoutParams() {
function syncRoutesWithoutChildrenWithParams() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -127,7 +127,7 @@ function syncRoutesWithoutChildrenWithParams() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -140,7 +140,7 @@ function syncRoutesWithoutChildrenWithParams() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['User', {name: 'naomi'}]">greet naomi</a> | <router-outlet></router-outlet>`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -153,7 +153,7 @@ function syncRoutesWithoutChildrenWithParams() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['User', {name: 'naomi'}]">greet naomi</a> | <router-outlet></router-outlet>`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -162,7 +162,7 @@ function syncRoutesWithoutChildrenWithParams() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('greet naomi | ');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('greet naomi | hello naomi');
expect(location.urlChanges).toEqual(['/user/naomi']);
@ -174,7 +174,7 @@ function syncRoutesWithoutChildrenWithParams() {
}));
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(
@ -195,18 +195,18 @@ function syncRoutesWithoutChildrenWithParams() {
function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -219,7 +219,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -232,7 +232,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -245,7 +245,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -254,7 +254,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('nav to child | outer { }');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement)
.toHaveText('nav to child | outer { inner { hello } }');
@ -269,18 +269,18 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `{ <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -294,7 +294,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `{ <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config(
@ -308,7 +308,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(
tcb,
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> { <router-outlet></router-outlet> }`)
@ -323,7 +323,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(
tcb,
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> { <router-outlet></router-outlet> }`)
@ -334,7 +334,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('nav to matias { }');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement)
.toHaveText('nav to matias { team angular | user { hello matias } }');
@ -349,18 +349,18 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
function syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams() {
var fixture;
var tcb;
var rtr;
var fixture: any /** TODO #9100 */;
var tcb: any /** TODO #9100 */;
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;
}));
it('should navigate by URL', inject([AsyncTestCompleter], (async) => {
it('should navigate by URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then(
@ -374,7 +374,7 @@ function syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams() {
});
}));
it('should navigate by link DSL', inject([AsyncTestCompleter], (async) => {
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then(
@ -388,7 +388,7 @@ function syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams() {
});
}));
it('should generate a link URL', inject([AsyncTestCompleter], (async) => {
it('should generate a link URL', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['/Parent']">link to inner</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then(
@ -402,7 +402,7 @@ function syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams() {
}));
it('should navigate from a link click',
inject([AsyncTestCompleter, Location], (async, location) => {
inject([AsyncTestCompleter, Location], (async: any /** TODO #9100 */, location: any /** TODO #9100 */) => {
compile(tcb, `<a [routerLink]="['/Parent']">link to inner</a> | outer { <router-outlet></router-outlet> }`)
.then((rtc) => {fixture = rtc})
.then(
@ -412,7 +412,7 @@ function syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams() {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('link to inner | outer { }');
rtr.subscribe((_) => {
rtr.subscribe((_: any /** TODO #9100 */) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement)
.toHaveText('link to inner | outer { inner { hello } }');
@ -432,7 +432,7 @@ function syncRoutesWithDynamicComponents() {
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;
}));
@ -440,7 +440,7 @@ function syncRoutesWithDynamicComponents() {
it('should work',
inject([AsyncTestCompleter],
(async) => {tcb.createAsync(DynamicLoaderCmp)
(async: any /** TODO #9100 */) => {tcb.createAsync(DynamicLoaderCmp)
.then((rtc) => {fixture = rtc})
.then((_) => rtr.config([new Route({path: '/', component: HelloCmp})]))
.then((_) => {
@ -475,13 +475,13 @@ function syncRoutesWithDynamicComponents() {
export function registerSpecs() {
specs['syncRoutesWithoutChildrenWithoutParams'] = syncRoutesWithoutChildrenWithoutParams;
specs['syncRoutesWithoutChildrenWithParams'] = syncRoutesWithoutChildrenWithParams;
specs['syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams'] =
(specs as any /** TODO #9100 */)['syncRoutesWithoutChildrenWithoutParams'] = syncRoutesWithoutChildrenWithoutParams;
(specs as any /** TODO #9100 */)['syncRoutesWithoutChildrenWithParams'] = syncRoutesWithoutChildrenWithParams;
(specs as any /** TODO #9100 */)['syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams'] =
syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams;
specs['syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams'] =
(specs as any /** TODO #9100 */)['syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams'] =
syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams;
specs['syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams'] =
(specs as any /** TODO #9100 */)['syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams'] =
syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams;
specs['syncRoutesWithDynamicComponents'] = syncRoutesWithDynamicComponents;
(specs as any /** TODO #9100 */)['syncRoutesWithDynamicComponents'] = syncRoutesWithDynamicComponents;
}