Skip to content

Commit

Permalink
fix(typescript) enum imports
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Selman <[email protected]>
  • Loading branch information
dselman committed Jun 6, 2023
1 parent 1200c2c commit 4e04a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codegen/fromcto/typescript/typescriptvisitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}';`);
});
}

Expand Down

0 comments on commit 4e04a40

Please sign in to comment.