Closed
Description
Typescript support
The module has no accompanying type definition file for typescript in the same package or under @types
.
Problem
PS D:\ProjectsShort\ParseMarkdown> tsc
parse.ts:1:28 - error TS7016: Could not find a declaration file for module 'mdast-util-from-markdown'.
'D:/ProjectsShort/ParseMarkdown/node_modules/mdast-util-from-markdown/index.js' implicitly has an 'any' type.
Try `npm install @types/mdast-util-from-markdown` if it exists or add a new declaration (.d.ts) file
containing `declare module 'mdast-util-from-markdown';`
1 import fromMarkdown from "mdast-util-from-markdown";
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expected behavior
Smooth integration in a typescript-based project.
Alternatives
Adding a mdast-util-from-markdown.d.ts file as suggested in the error message makes the compilation succeeds, but losing the type checking.