Skip to content

Overloads shouldn't gain @deprecated tags of other overloads in quick info #49368

@reecetwhite

Description

@reecetwhite

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

  • VS Code Version: 1.67.2
  • OS Version: Windows 11 Pro 21H2, also reproducible on macOS Monterey 12.4

Steps to Reproduce:

  1. Create a file that contains a list of exported, consecutive, overloaded functions, with a single @deprecated tag at the top of the first one.

api.d.ts

/**
 * @deprecated Use the new method instead.
 */
export function getArrayLength(arr: string[]): number;
export function getArrayLength(arr: number[]): number;
export function getArrayLength(arr: boolean[]): number;
  1. Create a file that imports the overloaded function

test.ts

import { getArrayLength } from "./api";

getArrayLength(["1"])
getArrayLength([1])
getArrayLength([true])
  1. Only the first function is striked-through, the other two overloaded functions aren't, even though they are all marked as @deprecated when hovering over them.
    image
    image
    image
    image

Either the bottom two overloaded functions shouldn't be marked as @deprecated when hovering over, or all three functions should be striked-through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: LS: Quick Infoe.g. hover text, tool-tips, and tooltips.Effort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Help WantedYou can do this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions