Skip to content

Duplicated documentation from common properties in union types #35170

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
SimonSiefke opened this issue Nov 18, 2019 · 5 comments · Fixed by #38489
Closed

Duplicated documentation from common properties in union types #35170

SimonSiefke opened this issue Nov 18, 2019 · 5 comments · Fixed by #38489
Assignees
Labels
Bug A bug in TypeScript Domain: Quick Info e.g. hover text, tool-tips, and tooltips. Fix Available A PR has been opened for this issue Help Wanted You can do this

Comments

@SimonSiefke
Copy link

SimonSiefke commented Nov 18, 2019

TS template added by @mjbvz

TypeScript Version: 3.8.0-dev.20191116

Search Terms:

  • suggest / suggestions
  • jsdoc

duplicate-description

  • VSCode Version: 1.41.0-insider
  • OS Version: Ubuntu 19.04

Steps to Reproduce:

  1. Create a typescript union type with descriptions for each type, e.g.
export type DocumentFilter = {
    /** A language id, like `typescript`. */
    language: string;
    /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
    scheme?: string;
    /** A glob pattern, like `*.{ts,js}`. */
    pattern?: string;
} | {
    /** A language id, like `typescript`. */
    language?: string;
    /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
    scheme: string;
    /** A glob pattern, like `*.{ts,js}`. */
    pattern?: string;
} | {
    /** A language id, like `typescript`. */
    language?: string;
    /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
    scheme?: string;
    /** A glob pattern, like `*.{ts,js}`. */
    pattern: string;
};
  1. When using intellisense, it shows duplicate descriptions

Does this issue occur when all extensions are disabled?: Yes

@lucashtc
Copy link

lucashtc commented Nov 18, 2019

I've had this problem because of more than one installed extension that makes this work

@SimonSiefke
Copy link
Author

For me it reproduces consistently in VSCode and VSCode Insiders with extensions disabled.

@mjbvz mjbvz transferred this issue from microsoft/vscode Nov 18, 2019
@mjbvz mjbvz unassigned octref and mjbvz Nov 18, 2019
@nmain
Copy link

nmain commented Nov 18, 2019

This reproduces in the playground as well

@AnyhowStep
Copy link
Contributor

AnyhowStep commented Nov 18, 2019

Related? (This one was fixed already, though)

#32708

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Dec 10, 2019
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Dec 10, 2019
@RyanCavanaugh RyanCavanaugh added the Domain: Quick Info e.g. hover text, tool-tips, and tooltips. label Dec 10, 2019
@minestarks minestarks changed the title vscode shows duplicate descriptions Duplicated documentation from common properties in union types Feb 7, 2020
@minestarks
Copy link
Member

In theory the doc comment above for each declaration of language could be different. What would we want to show in that case?

In this case since they're exactly the same we could probably collapse them into one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Quick Info e.g. hover text, tool-tips, and tooltips. Fix Available A PR has been opened for this issue Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants