jakearchibald / idb

IndexedDB, but with promises
https://www.npmjs.com/package/idb
ISC License
6.34k stars 357 forks source link

Inconsistent types for TypeScript's moduleResolution node16 and nodenext #268

Open philkunz opened 2 years ago

philkunz commented 2 years ago

This module exports esm style js files. However the d.ts files break with esm convention by not using .js extensions for import and export statements.

With the new TypeScript moduleResolution node16 and nodenext this breaks compilation with libcheck enabled.

-> This can be fixed by also using the nodenext moduleResolution when compiling this project :)

philkunz commented 2 years ago

Ok, the typescript stack seems a bit outdated. The typescript version still references some Release Candidate of 4.3.x, and updateting to 4.7.0 requires changes to the rollup config.

Problem with this one is, that basically to circumvent this problem in dependents, it requires turning off libcheck alltogether ... which is suboptimal.

philkunz commented 2 years ago

I see that there is a PR at https://github.com/jakearchibald/idb/pull/265/commits

@jakearchibald any chance you could look at it? :)

jakearchibald commented 2 years ago

I'll pick this up next week