Skip to content

typescript: support non-numeric Diagnostic.code #64848

Closed

Description

microsoft/TypeScript#28959 changes Diagnostic.code to type number | string. It's correctly displayed in the tooltip.

However, the code related to CodeFixes currently converts Diagnostic.code to a number before looking it up in the list of supported code fixes.
I'm planning on updating getSupportedCodeFixes to return Array<number | string> as I need CodeFixes for my custom Diagnostics. The current implementation would discard these codes as they result in NaN.

https://github.com/Microsoft/vscode/blob/b66143894b65270200b386b6865f243b101380d0/extensions/typescript-language-features/src/features/quickFix.ts#L156-L177

/cc Andrew Casey (@amcasey)

Activity

  1. added
    typescript
    on Dec 12, 2018
  2. added
    feature-request
    upstream
    on Dec 14, 2018
  3. added
    engineering
    on Jan 28, 2019
  4. locked and limited conversation to collaborators on Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

engineeringfeature-requesttypescriptupstream

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions