diff --git a/packages/schema/src/plugins/enhancer/enhance/index.ts b/packages/schema/src/plugins/enhancer/enhance/index.ts index 8e6e3719d..f99bc58d2 100644 --- a/packages/schema/src/plugins/enhancer/enhance/index.ts +++ b/packages/schema/src/plugins/enhancer/enhance/index.ts @@ -1,5 +1,5 @@ import { DELEGATE_AUX_RELATION_PREFIX } from '@zenstackhq/runtime'; -import { invariant, upperCaseFirst } from '@zenstackhq/runtime/local-helpers'; +import { upperCaseFirst } from '@zenstackhq/runtime/local-helpers'; import { PluginError, getAttribute, @@ -727,27 +727,6 @@ export type Enhanced = return structure; } - private transformVariableStatementProps(variable: VariableStatement) { - const structure = variable.getStructure(); - - // remove `delegate_aux_*` fields from the variable's initializer - const auxFields = this.findAuxProps(variable); - if (auxFields.length > 0) { - structure.declarations.forEach((variable) => { - if (variable.initializer) { - let source = variable.initializer; - auxFields.forEach((f) => { - invariant(typeof source === 'string'); - source = this.removeFromSource(source, f.getText()); - }); - variable.initializer = source; - } - }); - } - - return structure; - } - private transformInterface(iface: InterfaceDeclaration, delegateInfo: DelegateInfo) { const structure = iface.getStructure();