Skip to content

VSCode intellisense doesnt recognize @throws type in JSDoc #50998

Closed

Description

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 github (@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

Activity

  1. removed their assignment
    on Sep 29, 2022
  2. mjbvz commented on Sep 29, 2022

    @mjbvz
    Contributor

    Duplicate of #49323

  3. Andarist commented on Sep 29, 2022

    @Andarist
    Contributor

    Matt Bierner (@mjbvz) you might have referenced a wrong issue 😅

  4. locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions