Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions packages/schema/src/plugins/enhancer/enhance/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -727,27 +727,6 @@ export type Enhanced<Client> =
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();

Expand Down
Loading