We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3436488 commit 3e7e85dCopy full SHA for 3e7e85d
1 file changed
packages/schema/src/plugins/enhancer/enhance/index.ts
@@ -528,7 +528,7 @@ export type Enhanced<Client> =
528
return model.fields.filter((f) => isTypeDef(f.type.reference?.ref));
529
};
530
const jsonFieldTypes = getTypedJsonFields(modelWithJsonFields);
531
- const typeNames = jsonFieldTypes.map((field) => field.type.reference!.$refText);
+ const typeNames = [...new Set(jsonFieldTypes.map((field) => field.type.reference!.$refText))];
532
533
if (typeNames.length > 0) {
534
sfNew.addStatements(`import type { ${typeNames.join(', ')} } from "../../json-fields";`);
0 commit comments