-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Incorrect Error Message reported in JS file #15663
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
Comments
The root cause here seems to be the commented out argument names in |
We only look for arguments in jsdoc if they are defined, we should be more graceful. |
Based on the discussion from #15747, the function implementation should hold the truth about the signature, we only use the JSDoc for types. |
I want to know if I'm getting this right:
|
the real issue is that the compiler looks at the function body, finds no arguments The proposed fix is to always use the function even if it does not match the jsdoc. |
Fixed, pending PR. |
From @iMasoud on May 8, 2017 9:32
Steps to Reproduce:
npm install safejson
in the same directoryjsdoc.js
File to project, open it in VSCodejsdoc.txt
I honestly don't know if this is a problem with VSCode or JSDoc or Mentioned Module, but I do care about VSCode, so I'm reporting this.
Here is the Result:

As you can see VSCode shows this error as a problem in my code:

Supplied parameters do not match any signature of call target.
I was following module guide (and the code was running well) so I took a look at the module code. Following is the method that I was calling from that module:
(Whole file is available in here: https://github.com/evanshortiss/safejson/blob/848fcc7d8273f99fa783d2f27e2f57d2cc581a7c/src/index.js)
As you can see JSDoc documents/comments in module look fine. So, as I said before, I'm not really sure if this is a problem with VSCode. I'll be glad to read your opinions about this.
Regards
Copied from original issue: microsoft/vscode#26196
The text was updated successfully, but these errors were encountered: