refactor(core): type ComponentRef, ComponentFactory and ComponentFixture by the component type

BREAKING CHANGE:
- `ComponetRef`, `ComponentFactory`, `ComponentFixture` now all require a type
  parameter with the component type.
Closes #8361
This commit is contained in:
Tobias Bosch
2016-04-30 10:52:04 -07:00
parent 4e2c68354e
commit 6a0cbb8a57
48 changed files with 225 additions and 209 deletions

View File

@ -262,11 +262,11 @@ export function main() {
it('should register each application with the testability registry',
inject([AsyncTestCompleter], (async) => {
var refPromise1: Promise<ComponentRef> = bootstrap(HelloRootCmp, testProviders);
var refPromise2: Promise<ComponentRef> = bootstrap(HelloRootCmp2, testProviders);
var refPromise1: Promise<ComponentRef<any>> = bootstrap(HelloRootCmp, testProviders);
var refPromise2: Promise<ComponentRef<any>> = bootstrap(HelloRootCmp2, testProviders);
PromiseWrapper.all([refPromise1, refPromise2])
.then((refs: ComponentRef[]) => {
.then((refs: ComponentRef<any>[]) => {
var registry = refs[0].injector.get(TestabilityRegistry);
var testabilities =
[refs[0].injector.get(Testability), refs[1].injector.get(Testability)];