fix: Update test code to type-check under TS 2.5 (#20175)

PR Close #20175
This commit is contained in:
Alex Eagle
2017-11-15 08:43:35 -08:00
committed by Miško Hevery
parent c2a24b4241
commit 5ec1717c58
19 changed files with 55 additions and 48 deletions

View File

@ -399,7 +399,7 @@ export class UpgradeAdapter {
Promise.all([this.ng2BootstrapDeferred.promise, ng1BootstrapPromise]).then(([ng1Injector]) => {
angular.element(element).data !(controllerKey(INJECTOR_KEY), this.moduleRef !.injector);
this.moduleRef !.injector.get(NgZone).run(
this.moduleRef !.injector.get<NgZone>(NgZone).run(
() => { (<any>upgrade)._bootstrapDone(this.moduleRef, ng1Injector); });
}, onError);
return upgrade;

View File

@ -67,7 +67,7 @@ export class UpgradeNg1ComponentAdapterBuilder {
extractBindings() {
const btcIsObject = typeof this.directive !.bindToController === 'object';
if (btcIsObject && Object.keys(this.directive !.scope).length) {
if (btcIsObject && Object.keys(this.directive !.scope !).length) {
throw new Error(
`Binding definitions on scope and controller at the same time are not supported.`);
}