Skip to content

Commit 59fde0b

Browse files
authored
chore: remove unused code (#2194)
1 parent f835eb5 commit 59fde0b

File tree

1 file changed

+1
-22
lines changed
  • packages/schema/src/plugins/enhancer/enhance

1 file changed

+1
-22
lines changed

packages/schema/src/plugins/enhancer/enhance/index.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DELEGATE_AUX_RELATION_PREFIX } from '@zenstackhq/runtime';
2-
import { invariant, upperCaseFirst } from '@zenstackhq/runtime/local-helpers';
2+
import { upperCaseFirst } from '@zenstackhq/runtime/local-helpers';
33
import {
44
PluginError,
55
getAttribute,
@@ -727,27 +727,6 @@ export type Enhanced<Client> =
727727
return structure;
728728
}
729729

730-
private transformVariableStatementProps(variable: VariableStatement) {
731-
const structure = variable.getStructure();
732-
733-
// remove `delegate_aux_*` fields from the variable's initializer
734-
const auxFields = this.findAuxProps(variable);
735-
if (auxFields.length > 0) {
736-
structure.declarations.forEach((variable) => {
737-
if (variable.initializer) {
738-
let source = variable.initializer;
739-
auxFields.forEach((f) => {
740-
invariant(typeof source === 'string');
741-
source = this.removeFromSource(source, f.getText());
742-
});
743-
variable.initializer = source;
744-
}
745-
});
746-
}
747-
748-
return structure;
749-
}
750-
751730
private transformInterface(iface: InterfaceDeclaration, delegateInfo: DelegateInfo) {
752731
const structure = iface.getStructure();
753732

0 commit comments

Comments
 (0)