openapi-typescript icon indicating copy to clipboard operation
openapi-typescript copied to clipboard

Types aren't correctly exported for CJS

Open Oupsla opened this issue 11 months ago • 3 comments

Description

Typescript with "moduleResolution": "node16" will generate an error when trying to import the module from a cjs file.

Could not find a declaration file for module 'openapi-typescript'. '/node_modules/openapi-typescript/dist/index.cjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/openapi-typescript` if it exists or add a new declaration (.d.ts) file containing `declare module 'openapi-typescript';`ts(7016)
Name Version
openapi-typescript 7.4.4
Node.js 22.9.0

Reproduction

Check here : https://arethetypeswrong.github.io/?p=openapi-typescript%407.4.4

Checklist

Oupsla avatar Dec 11 '24 11:12 Oupsla