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
According to Are The Types Wrong the types for idb are not set up correctly. The main issue is that the exports property in package.json defines only one type for both the .cjs as well as the .js file:
Under moduleResolution "nodenext" or "node16" in a CJS project, this leads to an import which resolves to an ESM type declaration file, but a CommonJS JavaScript file.
According to Are The Types Wrong the types for idb are not set up correctly. The main issue is that the exports property in package.json defines only one type for both the .cjs as well as the .js file:
This is, however, not possible. It needs to export a separate type declaration file for each:
Under moduleResolution "nodenext" or "node16" in a CJS project, this leads to an import which resolves to an ESM type declaration file, but a CommonJS JavaScript file.
For context, this PR fixed the same issue in the openapi-fetch package: openapi-ts/openapi-typescript#1360
The text was updated successfully, but these errors were encountered: