diff --git a/lib/codegen/fromcto/typescript/typescriptvisitor.js b/lib/codegen/fromcto/typescript/typescriptvisitor.js index ff9d1799..8f9abe62 100644 --- a/lib/codegen/fromcto/typescript/typescriptvisitor.js +++ b/lib/codegen/fromcto/typescript/typescriptvisitor.js @@ -132,7 +132,7 @@ class TypescriptVisitor { Object.entries(namespaceBuckets) .filter(([namespace]) => namespace !== modelFile.getNamespace()) // Skip own namespace .map(([namespace, bucket]) => { - parameters.fileWriter.writeLine(0, `import type {\n\t${bucket.map(subclass => `I${subclass.getName()}`).join(',\n\t') }\n} from './${namespace}';`); + parameters.fileWriter.writeLine(0, `import type {\n\t${bucket.map(subclass => subclass.isEnum() ? subclass.getName() : `I${subclass.getName()}`).join(',\n\t') }\n} from './${namespace}';`); }); }