chore(ngUpgrade): cleanup TS errors
This commit is contained in:
parent
cd90e6ed8f
commit
84c3124292
@ -57,7 +57,7 @@ export class ExportedNg1Component {
|
|||||||
var scope = directive.scope;
|
var scope = directive.scope;
|
||||||
if (typeof scope == 'object') {
|
if (typeof scope == 'object') {
|
||||||
for (var name in scope) {
|
for (var name in scope) {
|
||||||
if (scope.hasOwnProperty(name)) {
|
if ((<any>scope).hasOwnProperty(name)) {
|
||||||
var localName = scope[name];
|
var localName = scope[name];
|
||||||
var type = localName.charAt(0);
|
var type = localName.charAt(0);
|
||||||
localName = localName.substr(1) || name;
|
localName = localName.substr(1) || name;
|
||||||
@ -96,7 +96,7 @@ export class ExportedNg1Component {
|
|||||||
static resolve(exportedComponents: {[name: string]: ExportedNg1Component},
|
static resolve(exportedComponents: {[name: string]: ExportedNg1Component},
|
||||||
injector: angular.auto.IInjectorService) {
|
injector: angular.auto.IInjectorService) {
|
||||||
for (var name in exportedComponents) {
|
for (var name in exportedComponents) {
|
||||||
if (exportedComponents.hasOwnProperty(name)) {
|
if ((<any>exportedComponents).hasOwnProperty(name)) {
|
||||||
var exportedComponent = exportedComponents[name];
|
var exportedComponent = exportedComponents[name];
|
||||||
exportedComponent.extractBindings(injector);
|
exportedComponent.extractBindings(injector);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ export class UpgradeModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exportAsNg2Component(name: string): Type {
|
exportAsNg2Component(name: string): Type {
|
||||||
if (this.exportedNg1Components.hasOwnProperty(name)) {
|
if ((<any>this.exportedNg1Components).hasOwnProperty(name)) {
|
||||||
return this.exportedNg1Components[name].type;
|
return this.exportedNg1Components[name].type;
|
||||||
} else {
|
} else {
|
||||||
return (this.exportedNg1Components[name] = new ExportedNg1Component(name)).type;
|
return (this.exportedNg1Components[name] = new ExportedNg1Component(name)).type;
|
||||||
|
17
modules/upgrade/tsconfig.json
Normal file
17
modules/upgrade/tsconfig.json
Normal file
@ -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"
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user