Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Render uses of deprecated symbols #33093

Closed
Labels
Milestone
@mjbvz

Description

@mjbvz

TypeScript Version: 3.6.0-rc

Search Terms:

  • diagnostics
  • errors
  • suggestions
  • suggestion diagnostics
  • deprecated

Feature request
VS Code recently added special for special rendering of error spans for deprecated symbols:microsoft/vscode#56694 These are rendered as strike out in the editor

We would like the TypeScript server to also generate suggestion diagnostics for uses of deprecated symbols:

/** *@deprecated */functionfoo(){}foo()/* Call to `foo` should rendered with a strike out*/

Proposed API change
This feature is broadly similar to how TypeScript supports rendering unused diagnostics. Unused diagnostics are indicated by areportsUnnecessary field on the diagnostic.

To support deprecated diagnostics as well, we could add a newreportsDeprecated field

[Trace  - 2:56:06 PM] <semantic> Event received: suggestionDiag (0).Data: {    "file": "/Users/matb/projects/san/index.ts",    "diagnostics": [        {            "start": {                "line": 6,                "offset": 10            },            "end": {                "line": 6,                "offset": 13            },            "text": "'foo' is marked deprecated.",            "code": 6133,            "category": "suggestion",            "reportsDeprecated": true        }    ]}

VS Code would provide the support for enabling/disabling deprecated diagnostics; TS Server just needs to return this information to us

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp