@nestledjs/api 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -329,7 +329,9 @@ function generateEnums(enums: readonly any[]): string {
|
|
|
329
329
|
|
|
330
330
|
if (enums.length > 0) {
|
|
331
331
|
const enumNames = enums.map(e => e.name).join(', ')
|
|
332
|
-
|
|
332
|
+
// Import first to make enums available in scope, then export separately
|
|
333
|
+
output += `import { ${enumNames} } from '${prismaImportPath}';\n`
|
|
334
|
+
output += `export { ${enumNames} };\n\n`
|
|
333
335
|
|
|
334
336
|
enums.forEach(enumType => {
|
|
335
337
|
output += `registerEnumType(${enumType.name}, { name: '${enumType.name}' });\n\n`
|