TS7016: Could not find a declaration file for module postcss-normalize. `postcss-normalize/index.mjs` implicitly has an any type.
There are types at `postcss-normalize/index.d.ts`, but this result could not be resolved when respecting package.json exports. The postcss-normalize library may need to update its package.json or typings.
Second issue fixed:
Typescript "moduleResolution": "node16" requires different type info when CJS modules like this one are imported from ESM module.
To make default exports (export default) work for both CJS and ESM, we need export = X and not export default X.
When you have multiple exports you need to create a namespace named exactly X and in there define the exports.
First issue fixed
"moduleResolution": "node16"
in TS will cause:Second issue fixed:
"moduleResolution": "node16"
requires different type info whenCJS
modules like this one are imported fromESM
module.export default
) work for both CJS and ESM, we needexport = X
and notexport default X
.refs:
PS/FYI:
npm run test tape
was failing even before my changes so i had to commit with--no-verify
.