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

typescript project report error,which is normal after elimination #423

Open
midnight-ht opened this issue May 17, 2021 · 1 comment
Open

Comments

@midnight-ht
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/jsdoc-vuejs/index.js b/node_modules/jsdoc-vuejs/index.js
index 2205f33..30b7019 100644
--- a/node_modules/jsdoc-vuejs/index.js
+++ b/node_modules/jsdoc-vuejs/index.js
@@ -17,7 +17,7 @@ exports.handlers = {
   beforeParse(e) {
     if (/\.vue$/.test(e.filename)) {
       exportDefaultLines[e.filename] = seekExportDefaultLine(e.source, e.filename);
-      e.source = extractVueScript(e.filename);
+      e.source = extractVueScript(e.filename).replace(/\:\s(string|number|boolean|Undefined|null|Array|object|any|void)/ig, '');
     }
   },
   newDoclet(e) {

This issue body was partially generated by patch-package.

@midnight-ht midnight-ht changed the title typescript 项目报错,排除之后正常 typescript project report error,which is normal after elimination May 17, 2021
@Kocal
Copy link
Owner

Kocal commented May 18, 2021

Hi @midnight-ht, and thanks!

I'm not sure to correctly understand the patch, would it be possible for you to add some tests?
Thanks!

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

No branches or pull requests

2 participants