openapi-typescript
openapi-typescript copied to clipboard
Missing types
openapi-typescript version
7.6.1
Node.js version
20.18.3
OS + version
any
Description
When importing openapi-typescript from a CommonJS project, TypeScript cannot find its types (because the library ships only with types for ESM, not generic for both module systems).
Reproduction
- Create a CommonJS TypeScript project (no
"type": "module"inpackage.jsonand"module": "node16"intsconfig.json). - import
openapi-typescriptin any TypeScript file.
Currently, TSC cannot find the library types.
Expected result
TypeScript would not complain about the import and would detect the types correctly.
Required
- [x] My OpenAPI schema is valid and passes the Redocly validator (
npx @redocly/cli@latest lint)
Extra
- [ ] I’m willing to open a PR (see CONTRIBUTING.md)