From 38f1eee833f2df1301eb1efde1531fab5e775c6c Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Sun, 20 Jul 2025 11:26:21 +0800 Subject: [PATCH 1/2] chore: remove unused code --- .../src/plugins/enhancer/enhance/index.ts | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/packages/schema/src/plugins/enhancer/enhance/index.ts b/packages/schema/src/plugins/enhancer/enhance/index.ts index 8e6e3719d..0bfc918d6 100644 --- a/packages/schema/src/plugins/enhancer/enhance/index.ts +++ b/packages/schema/src/plugins/enhancer/enhance/index.ts @@ -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(); From 4a94364c0a755dcf23cc5aa80a1aaf14c122f264 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:57:51 +0800 Subject: [PATCH 2/2] update --- packages/schema/src/plugins/enhancer/enhance/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema/src/plugins/enhancer/enhance/index.ts b/packages/schema/src/plugins/enhancer/enhance/index.ts index 0bfc918d6..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,