Skip to content

Type completions in jsDoc @augments and @implements tags. #36939

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

Open
5 tasks done
dragomirtitian opened this issue Feb 21, 2020 · 2 comments
Open
5 tasks done

Type completions in jsDoc @augments and @implements tags. #36939

dragomirtitian opened this issue Feb 21, 2020 · 2 comments
Assignees
Labels
Needs Investigation This issue needs a team member to investigate its status.
Milestone

Comments

@dragomirtitian
Copy link
Contributor

dragomirtitian commented Feb 21, 2020

Suggestion

Add code completions in jsDoc @augments and @implements clauses.

Use Cases

Anybody using the new @implements and @augments jsDoc tags will benefit from this.

Examples

Inside the {} triggering code completions should show types.

/**
 * @augments {}
 * @implements {}
 */
declare class B {
    b(): void;
    i(): void;
}

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

This is a flow-on from #36292 cc: @sandersn

@dragomirtitian
Copy link
Contributor Author

dragomirtitian commented Feb 21, 2020

I have a PR ready to go for this once the @implements (#36292) PR makes it in.

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Feb 26, 2020
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.9.1 milestone Feb 26, 2020
@sandersn
Copy link
Member

sandersn commented Jul 6, 2020

It turns out that Typescript doesn't even support this properly — there aren't even any (good) completions in Typescript for class B implements /**/. And it's not a completion location at all, so you have to request completions manually in the first place.

We can wait to fix this issue until completions for Typescript interfaces is available, at which point it should be fairly simple.

@sandersn sandersn modified the milestones: Typescript 4.0.1, Backlog Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Investigation This issue needs a team member to investigate its status.
Projects
None yet
Development

No branches or pull requests

3 participants