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
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" in package.json and "module": "node16" in tsconfig.json).
import openapi-typescript in 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
My OpenAPI schema is valid and passes the Redocly validator (npx @redocly/cli@latest lint)
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
"type": "module"
inpackage.json
and"module": "node16"
intsconfig.json
).openapi-typescript
in 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
npx @redocly/cli@latest lint
)Extra
The text was updated successfully, but these errors were encountered: