Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Problem
Following up on syntax-tree/mdast-util-from-markdown#32 .. cc @wooorm
The problem is that
remark-parse
was last published (2 years ago) before"moduleResolution": "node16"
was a thing (it’s not even in remark yet: https://github.com/remarkjs/remark/blob/main/tsconfig.json). 2 years ago, the TS CLI generated code that doesn’t work in todays TS withmoduleResolution: node16
.I believe that the solution is to use a current correct TS config (e.g., like this: https://github.com/syntax-tree/mdast-util-from-markdown/blob/cd10e598ae2492c8b61131d2ace46e0ea7cc37e5/tsconfig.json), then regenerate all types in remark, and cut a new release
I checked remark-parse
, and it looks like it is already extending the root tsconfig.json
, which was up to date .
I tried rebuilding the package locally, and the type error is no longer reported:
node_modules/remark-parse/lib/index.d.ts:3:26 - error TS2307: Cannot find module 'mdast-util-from-markdown/lib' or its corresponding type declarations.
3 options: void | import('mdast-util-from-markdown/lib').Options | undefined
Found 1 error in node_modules/remark-parse/lib/index.d.ts:3
Solution
It looks like all what we need is cutting out a new release should fix this.
Please let me know if there is anything else I can do.
Alternatives
N/A