You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not detected by TypeScript because the package is currently using v13 types with the v14 package.
The v14 package switched to esm exports, but did not define bare module paths. So if you clone this repo, update to the v14 types and look in vscode you get errors about the bare module import of Token not existing:
This caused an issue for us upstream as we tweak some MarkdownParser behavior so imported the v13 types and with an attempted upgrade of our types to v14 our TypeScript build was failing.
Because this is a type only import it seems to be safe to update the types to v14 and update the import to:
importtypeTokenfrom"markdown-it/lib/token.mjs";
Which is elided from the cjs/js builds (the different cjs/mjs exports never include the type import) and it fixes the TypeScript issues.
The text was updated successfully, but these errors were encountered:
Thanks for spotting that. Attached patch upgrades the dependency. import type doesn't seem to be needed—TypeScript will automatically drop type-only imports from its build output.
The following Token import does not align with what is exported from markdown-it:
prosemirror-markdown/src/from_markdown.ts
Line 3 in e595214
This is not detected by TypeScript because the package is currently using v13 types with the v14 package.
The v14 package switched to esm exports, but did not define bare module paths. So if you clone this repo, update to the v14 types and look in vscode you get errors about the bare module import of Token not existing:
This caused an issue for us upstream as we tweak some MarkdownParser behavior so imported the v13 types and with an attempted upgrade of our types to v14 our TypeScript build was failing.
Because this is a type only import it seems to be safe to update the types to v14 and update the import to:
Which is elided from the cjs/js builds (the different cjs/mjs exports never include the type import) and it fixes the TypeScript issues.
The text was updated successfully, but these errors were encountered: