-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG] [typescript] not compatible with --isolatedModules #6805
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
It's been over two years since this bug is open. Are there any plans to fix it? A temporary workaround for anyone who is waiting for the fix:
Hopefully it won't be needed soon but meanwhile this can be used to fix the code automatically. |
I wonder if you can file a PR to fix it 🙏 |
Okay a PR is not necessary. I took a look at the code and i saw that the export type will be set when the addditional property platform=deno is set. For example: |
Nevermind. The deno Version is not compatible with node. I will create a PR |
…for-TypescriptClient-(OpenAPITools#6805)
* Fix export type for typescript interfaces in all platforms (#6805) * Generated samples and docs * chore: update samples --------- Co-authored-by: Kevin Broja <[email protected]>
Bug Report Checklist
Description
Using the new TypeScript generator from #6341
The generated code is not compatible with
--isolatedModules
, which is required by popular setups such ascreate-react-app
.openapi-generator version
5.0.0-SNAPSHOT
OpenAPI declaration file content or url
https://github.com/bard/repro-openapi-generator-typescript-isolated-modules/blob/master/example.yaml
Command line used for generation
OPENAPI_GENERATOR_VERSION=5.0.0-SNAPSHOT /tmp/openapi-generator-cli.sh generate -g typescript -i example.yaml -o ./src/api
Steps to reproduce
git clone https://github.com/bard/repro-openapi-generator-typescript-isolated-modules/blob/master/example.yaml
OPENAPI_GENERATOR_VERSION=5.0.0-SNAPSHOT /tmp/openapi-generator-cli.sh generate -g typescript -i example.yaml -o ./src/api
yarn && yarn start
Related issues/PRs
facebook/create-react-app#6054
Suggest a fix
Possible workaround is to export
*
fromindex.ts
:The text was updated successfully, but these errors were encountered: