Skip to content

VSCode intellisense doesnt recognize @throws type in JSDoc #50998

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

Closed
TrevorSlobodnick opened this issue Sep 29, 2022 · 2 comments
Closed

VSCode intellisense doesnt recognize @throws type in JSDoc #50998

TrevorSlobodnick opened this issue Sep 29, 2022 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@TrevorSlobodnick
Copy link

Type: Feature Request

  • Create and open a javascript file
  • Write a function that throws an error
  • Add a comment above the function using the format
    * @throws {AnyError} Throws an error

When hovering over the function, you can see the literal text "@throws --- {AnyError} Throws an error" while I expected to see something more like "@throws --- Throws an error".

I was expecting @throws to work the same way @param and @returns do, Where if you provide a type, VSCode will recognize it, remove it from the description when the function is hovered, and be able to use that information in my code (Whenever the function is called, it should show some kind of alert to wrap it in a try/catch)

VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:03:37.738Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No

@mjbvz mjbvz transferred this issue from microsoft/vscode Sep 29, 2022
@mjbvz mjbvz removed their assignment Sep 29, 2022
@mjbvz
Copy link
Contributor

mjbvz commented Sep 29, 2022

Duplicate of #49323

@mjbvz mjbvz closed this as completed Sep 29, 2022
@mjbvz mjbvz marked this as a duplicate of #49323 Sep 29, 2022
@mjbvz mjbvz added the Duplicate An existing issue was already created label Sep 29, 2022
@Andarist
Copy link
Contributor

@mjbvz you might have referenced a wrong issue 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants