source-map-js
source-map-js copied to clipboard
Fix TS2306 “not a module” errors in type definitions
Fixes TypeScript errors like this when substituting source-map-js for source-map using pnpm overrides.
node_modules/.pnpm/[email protected]_dpcjkp5o5ztxuvt4quwwvenemi/node_modules/css-minimizer-webpack-plugin/types/index.d.ts:141:28 - error TS2306: File '/srv/zulip/node_modules/.pnpm/[email protected]/node_modules/source-map-js/source-map.d.ts' is not a module.
141 type RawSourceMap = import("source-map").RawSourceMap;
~~~~~~~~~~~~
- Fixes #24.
@andersk Hi! It's not clear to me: why it wasn't a problem before 1.0.2?
@7rulnik This was broken by the incorrect usage of declare module that was added in #13, which was merged in 1.0.2.
See the reproduction recipe in #24.
Ahhh, my bad! For some reason, I read 1.0.2 as 1.2.0 and was really confused about it. Sorry! I will take a look into it a bit later!
Thanks for PR and sorry for waiting! Published as https://www.npmjs.com/package/source-map-js/v/1.2.1