refactor: rename ComponentRenderTypeV2 to RendererTypeV2

This commit is contained in:
Tobias Bosch
2017-02-17 09:01:37 -08:00
committed by Igor Minar
parent b9f17a9cb2
commit 778ded9fcf
20 changed files with 87 additions and 94 deletions

View File

@ -7,7 +7,7 @@
*/
import {AnimationEntryCompileResult} from '../animation/animation_compiler';
import {CompileDirectiveMetadata, CompilePipeSummary, componentRenderTypeName, tokenName, viewClassName} from '../compile_metadata';
import {CompileDirectiveMetadata, CompilePipeSummary, rendererTypeName, tokenName, viewClassName} from '../compile_metadata';
import {EventHandlerVars, LegacyNameResolver} from '../compiler_util/expression_converter';
import {CompilerConfig} from '../config';
import {isPresent} from '../facade/lang';
@ -70,7 +70,7 @@ export class CompileView implements LegacyNameResolver {
public pipes: CompilePipe[] = [];
public locals = new Map<string, o.Expression>();
public className: string;
public renderComponentTypeName: string;
public rendererTypeName: string;
public classType: o.Type;
public classExpr: o.ReadVarExpr;
@ -103,7 +103,7 @@ export class CompileView implements LegacyNameResolver {
this.viewType = getViewType(component, viewIndex);
this.className = viewClassName(component.type.reference, viewIndex);
this.renderComponentTypeName = componentRenderTypeName(component.type.reference);
this.rendererTypeName = rendererTypeName(component.type.reference);
this.classType = o.expressionType(o.variable(this.className));
this.classExpr = o.variable(this.className);
if (this.viewType === ViewType.COMPONENT || this.viewType === ViewType.HOST) {

View File

@ -386,7 +386,7 @@ function createViewTopLevelStmts(view: CompileView, targetStatements: o.Statemen
const renderCompTypeVar: o.ReadVarExpr =
o.variable(view.renderComponentTypeName); // fix highlighting: `
o.variable(view.rendererTypeName); // fix highlighting: `
if (view.viewIndex === 0) {
let templateUrlInfo: string;
if (view.component.template.templateUrl == identifierModuleUrl(view.component.type)) {

View File

@ -24,8 +24,7 @@ export {ComponentFactoryDependency, ComponentViewDependency, DirectiveWrapperDep
export class ViewCompileResult {
constructor(
public statements: o.Statement[], public viewClassVar: string,
public componentRenderTypeVar: string,
public statements: o.Statement[], public viewClassVar: string, public rendererTypeVar: string,
public dependencies:
Array<ComponentViewDependency|ComponentFactoryDependency|DirectiveWrapperDependency>) {}
}
@ -52,6 +51,6 @@ export class ViewCompiler {
finishView(view, statements);
return new ViewCompileResult(
statements, view.classExpr.name, view.renderComponentTypeName, dependencies);
statements, view.classExpr.name, view.rendererTypeName, dependencies);
}
}