Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use namespace as type #69526

Closed
bonitao opened this issue May 6, 2024 · 1 comment
Closed

Cannot use namespace as type #69526

bonitao opened this issue May 6, 2024 · 1 comment

Comments

@bonitao
Copy link

bonitao commented May 6, 2024

See https://stackoverflow.com/questions/53853815/how-to-fix-cannot-use-namespace-as-a-type-ts2709-in-typescript.

The error seems to be here:

readonly linkify: LinkifyIt;

And here is my client side patch:

diff --git a/dist/index.cjs.d.ts b/dist/index.cjs.d.ts
index 3937a618c13b3bfb017ab163cb613020bf670d40..a149fa7f935837a3ca6c3fd758b6e1281ba44bff 100644
--- a/dist/index.cjs.d.ts
+++ b/dist/index.cjs.d.ts
@@ -979,7 +979,7 @@ interface MarkdownIt {
      * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
      * rule.
      */
-    readonly linkify: LinkifyIt;
+    readonly linkify: typeof LinkifyIt;

     /**
      * Link validation function. CommonMark allows too much in links. By default
@viceice
Copy link
Contributor

viceice commented Aug 14, 2024

this is fixed since @types/markdown-it@14.1.1, so this issue can be closed

fixed by:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants