Skip to content

values are marked deprecated when only type has @deprecated #39474

Closed
@rbuckton

Description

@rbuckton

TypeScript Version: 4.0.0-dev.20200701

Search Terms: jsdoc deprecated tag

Code

interface ESMap<K, V> { }

/** @deprecated */
interface Map<T> extends ESMap<string, T> {}

declare const Map: new <K, V>() => ESMap<K, V>;

new Map<string, number>(); // 'Map' is crossed out

Expected behavior:

  • Map the value is not deprecated and should not be crossed out.

Actual behavior:

  • Map the value is considered deprecated, even though Map the type is not part of the value declaration of Map:

In VSCode:
image

In Playground:
image

Playground Link: https://www.typescriptlang.org/play/index.html?ts=4.0.0-dev.20200707#code/KYDwDg9gTgLgBAbzgXwNwCh0EsB2NhQBmAhgMbBwCiAygLLFgA8A0gDRwBqAfIipgPQAqQXAACAE2BgowUsXzi4g-tjwES5OPSYAVHqHw5xAZyp0GjYzCi4A5uz2JkmSaQA2xGXFIQcVrQwAXHA4wADucCzs3AAUAJRwALw8NNpRnFwYmOihEWlWNjj2IQCuALYARgRc8ahw-PxwAOTaTXBYpj5+WJIyipLSsvLAijHGwBQAjiVYpADW7TiEEHFAA

Related Issues: #38523

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions