From bcbc62455a6f88cb191b81df7b5d85147bb7d772 Mon Sep 17 00:00:00 2001 From: Matt Hodgson Date: Thu, 11 Sep 2025 13:27:20 -0400 Subject: [PATCH] fix(enhancer): replace $Types.Skip with runtime.Types.Skip --- packages/schema/src/plugins/enhancer/enhance/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema/src/plugins/enhancer/enhance/index.ts b/packages/schema/src/plugins/enhancer/enhance/index.ts index 81ab61a5c..924d5b623 100644 --- a/packages/schema/src/plugins/enhancer/enhance/index.ts +++ b/packages/schema/src/plugins/enhancer/enhance/index.ts @@ -612,7 +612,7 @@ export type Enhanced = throw new PluginError(name, `Unexpected syntax list structure in ${fileName}`); } - const statements: (string | StatementStructures)[] = ['import $Types = runtime.Types;']; + const statements: (string | StatementStructures)[] = []; // Add import for json-types if this model has JSON type fields const modelWithJsonFields = this.modelsWithJsonTypeFields.find((m) => m.name === d.name); @@ -1032,7 +1032,7 @@ export type Enhanced = // Check if the field in the source is optional (has a `?`) const isOptionalInSource = new RegExp(`(${field.name}\\?\\s*):`).test(source); if (isOptionalInSource) { - replaceValue += ' | $Types.Skip'; + replaceValue += ' | runtime.Types.Skip'; } return source.replace(new RegExp(`(${field.name}\\??\\s*):[^\\n]+`), replaceValue);