taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.12k stars 112 forks source link

node_modules/node-html-parser/dist/nodes/comment.d.ts(18,1) | TS1128: Declaration or statement expected. #261

Closed aguirrejuanse closed 11 months ago

aguirrejuanse commented 11 months ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch node-html-parser@3.3.6 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/node-html-parser/dist/nodes/comment.d.ts b/node_modules/node-html-parser/dist/nodes/comment.d.ts
index 82098ed..e33209b 100644
--- a/node_modules/node-html-parser/dist/nodes/comment.d.ts
+++ b/node_modules/node-html-parser/dist/nodes/comment.d.ts
@@ -14,5 +14,5 @@ export default class CommentNode extends Node {
      * @return {string} text content
      */
     get text(): string;
-    toString(): `<!--${string}-->`;
+    toString(): string;
 }

This issue body was partially generated by patch-package.

taoqf commented 11 months ago

Thanks, latest version looks fine.