refactor(compiler): extract expression evaluation and writing to renderer from view_compiler
This is needed to that `DirectiveWrapper`s can also use them later on. Part of #11683
This commit is contained in:
@ -27,10 +27,10 @@ export function createClassStmt(config: {
|
||||
|
||||
return new o.ClassStmt(
|
||||
config.name, config.parent, builder.fields, builder.getters, ctor, builder.methods,
|
||||
config.modifiers || [])
|
||||
config.modifiers || []);
|
||||
}
|
||||
|
||||
function concatClassBuilderParts(builders: ClassBuilderPart[]): ClassBuilder {
|
||||
function concatClassBuilderParts(builders: ClassBuilderPart[]) {
|
||||
return {
|
||||
fields: [].concat(...builders.map(builder => builder.fields || [])),
|
||||
methods: [].concat(...builders.map(builder => builder.methods || [])),
|
||||
@ -52,9 +52,9 @@ export interface ClassBuilderPart {
|
||||
/**
|
||||
* Collects data for a generated class.
|
||||
*/
|
||||
export interface ClassBuilder extends ClassBuilderPart {
|
||||
export interface ClassBuilder {
|
||||
fields: o.ClassField[];
|
||||
methods: o.ClassMethod[];
|
||||
getters: o.ClassGetter[];
|
||||
ctorStmts: o.Statement[];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user