Skip to content

Commit 84c3124

Browse files
committed
chore(ngUpgrade): cleanup TS errors
1 parent cd90e6e commit 84c3124

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

modules/upgrade/src/ng1_facade.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class ExportedNg1Component {
5757
var scope = directive.scope;
5858
if (typeof scope == 'object') {
5959
for (var name in scope) {
60-
if (scope.hasOwnProperty(name)) {
60+
if ((<any>scope).hasOwnProperty(name)) {
6161
var localName = scope[name];
6262
var type = localName.charAt(0);
6363
localName = localName.substr(1) || name;
@@ -96,7 +96,7 @@ export class ExportedNg1Component {
9696
static resolve(exportedComponents: {[name: string]: ExportedNg1Component},
9797
injector: angular.auto.IInjectorService) {
9898
for (var name in exportedComponents) {
99-
if (exportedComponents.hasOwnProperty(name)) {
99+
if ((<any>exportedComponents).hasOwnProperty(name)) {
100100
var exportedComponent = exportedComponents[name];
101101
exportedComponent.extractBindings(injector);
102102
}

modules/upgrade/src/upgrade_module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class UpgradeModule {
5757
}
5858

5959
exportAsNg2Component(name: string): Type {
60-
if (this.exportedNg1Components.hasOwnProperty(name)) {
60+
if ((<any>this.exportedNg1Components).hasOwnProperty(name)) {
6161
return this.exportedNg1Components[name].type;
6262
} else {
6363
return (this.exportedNg1Components[name] = new ExportedNg1Component(name)).type;

modules/upgrade/tsconfig.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"target": "es3",
5+
"noImplicitAny": false,
6+
"rootDir": ".",
7+
"sourceMap": false,
8+
"noEmit": true
9+
},
10+
"files": [
11+
"src/angular.d.ts",
12+
"upgrade.ts"
13+
],
14+
"exclude": [
15+
"node_modules"
16+
]
17+
}

0 commit comments

Comments
 (0)