You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, this won't compile in ESM projects were tsconfig.json contains "moduleResolution": "nodenext" or "moduleResolution": "node16".
Screenshots
How could it be implemented/designed?
Adding a --tsRelativeImportExtension=<undefined | js | ts> flag (inspired by Typescript's --rewriteRelativeImportExtensions flag and AsyncAPI's CLI --ts* flags), would allow users to override the default behavior with the appropriate extension. .ts and .js should be supported for flexibility.
Yes I am willing to submit a PR! Given that this could be a cross-repository change (both modelina & asyncapi/cli ), I might need some additional guidance 😅
The text was updated successfully, but these errors were encountered:
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. Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Why do we need this improvement?
Currently, generated Typescript files using the following command:
results in imports looking like this:
Unfortunately, this won't compile in ESM projects were
tsconfig.json
contains"moduleResolution": "nodenext"
or"moduleResolution": "node16"
.Screenshots
How could it be implemented/designed?
Adding a
--tsRelativeImportExtension=<undefined | js | ts>
flag (inspired by Typescript's--rewriteRelativeImportExtensions
flag and AsyncAPI's CLI --ts* flags), would allow users to override the default behavior with the appropriate extension..ts
and.js
should be supported for flexibility.🚧 Breaking changes
No
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue?
Yes I am willing to submit a PR! Given that this could be a cross-repository change (both modelina & asyncapi/cli ), I might need some additional guidance 😅
The text was updated successfully, but these errors were encountered: