fix(compiler): make code easier to type check

These changes are needed for the G3 sync as we use a different version/settings of Typescript than on Github.

closes #9701
This commit is contained in:
Tobias Bosch
2016-06-29 10:26:45 -07:00
parent e81dea695c
commit 51d4c9dcbd
3 changed files with 15 additions and 10 deletions

View File

@ -129,10 +129,12 @@ export class OfflineCompiler {
function _resolveViewStatements(compileResult: ViewCompileResult): o.Statement[] {
compileResult.dependencies.forEach((dep) => {
if (dep instanceof ViewFactoryDependency) {
dep.placeholder.moduleUrl = _ngfactoryModuleUrl(dep.comp);
let vfd = <ViewFactoryDependency>dep;
vfd.placeholder.moduleUrl = _ngfactoryModuleUrl(vfd.comp);
} else if (dep instanceof ComponentFactoryDependency) {
dep.placeholder.name = _componentFactoryName(dep.comp);
dep.placeholder.moduleUrl = _ngfactoryModuleUrl(dep.comp);
let cfd = <ComponentFactoryDependency>dep;
cfd.placeholder.name = _componentFactoryName(cfd.comp);
cfd.placeholder.moduleUrl = _ngfactoryModuleUrl(cfd.comp);
}
});
return compileResult.statements;