diff --git a/modules/upgrade/src/ng1_facade.ts b/modules/upgrade/src/ng1_facade.ts index d1a257846a..92da15ea2e 100644 --- a/modules/upgrade/src/ng1_facade.ts +++ b/modules/upgrade/src/ng1_facade.ts @@ -57,7 +57,7 @@ export class ExportedNg1Component { var scope = directive.scope; if (typeof scope == 'object') { for (var name in scope) { - if (scope.hasOwnProperty(name)) { + if ((scope).hasOwnProperty(name)) { var localName = scope[name]; var type = localName.charAt(0); localName = localName.substr(1) || name; @@ -96,7 +96,7 @@ export class ExportedNg1Component { static resolve(exportedComponents: {[name: string]: ExportedNg1Component}, injector: angular.auto.IInjectorService) { for (var name in exportedComponents) { - if (exportedComponents.hasOwnProperty(name)) { + if ((exportedComponents).hasOwnProperty(name)) { var exportedComponent = exportedComponents[name]; exportedComponent.extractBindings(injector); } diff --git a/modules/upgrade/src/upgrade_module.ts b/modules/upgrade/src/upgrade_module.ts index 24423e370b..1e5c4879d2 100644 --- a/modules/upgrade/src/upgrade_module.ts +++ b/modules/upgrade/src/upgrade_module.ts @@ -57,7 +57,7 @@ export class UpgradeModule { } exportAsNg2Component(name: string): Type { - if (this.exportedNg1Components.hasOwnProperty(name)) { + if ((this.exportedNg1Components).hasOwnProperty(name)) { return this.exportedNg1Components[name].type; } else { return (this.exportedNg1Components[name] = new ExportedNg1Component(name)).type; diff --git a/modules/upgrade/tsconfig.json b/modules/upgrade/tsconfig.json new file mode 100644 index 0000000000..e49a4cb114 --- /dev/null +++ b/modules/upgrade/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es3", + "noImplicitAny": false, + "rootDir": ".", + "sourceMap": false, + "noEmit": true + }, + "files": [ + "src/angular.d.ts", + "upgrade.ts" + ], + "exclude": [ + "node_modules" + ] +}