-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support verbatimModuleSyntax in TypeScript Generator #1793
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
I think it makes sense to just render it by default for interfaces (is there any other cases?) if it has no side effects of course ✌️ All we need is to adapt the dependency manager: https://github.com/asyncapi/modelina/blob/master/src/generators/typescript/TypeScriptDependencyManager.ts#L48 |
🎉 This issue has been resolved in version 3.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 4.0.0-next.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@moritzkalwa not sure if you saw, but I unfortunately had to revert your PR because of breaking changes to the dependency functions and the bug it introduced. I am planning on fixing it at some point, but right now I have to spend time on something else. If you got the time to help I would really appreciate it 🤙 |
I saw and I'm planning on taking another look at it in the future. Haven't had the time to do so yet though, and probably won't until next week. Would love to fix that issue and get this done though, if that is early enough! |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
Reason/Context
Currently the typescript generator does not explicitly export/import interfaces as types. This is an issue when the typescript option 'verbatimModuleSyntax' is enabled and can potentially cause some other pitfalls.
Description
Add a new flag (or make this the default behaviour when using interfaces, afaik that should not cause any issues) that changes the behaviour of 'src/generators/typescript/TypeScriptDependencyManager.ts' so it imports and exports interfaces as types.
Before:
After:
The text was updated successfully, but these errors were encountered: