Skip to content
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

typescript: support non-numeric Diagnostic.code #64848

Closed
ajafff opened this issue Dec 12, 2018 · 0 comments
Closed

typescript: support non-numeric Diagnostic.code #64848

ajafff opened this issue Dec 12, 2018 · 0 comments
Assignees
Labels
engineering VS Code - Build / issue tracking / etc. feature-request Request for new features or functionality typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@ajafff
Copy link

ajafff commented Dec 12, 2018

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 @amcasey

@vscodebot vscodebot bot added the typescript Typescript support issues label Dec 12, 2018
@mjbvz mjbvz added feature-request Request for new features or functionality upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Dec 14, 2018
@mjbvz mjbvz added this to the December/January 2019 milestone Dec 14, 2018
@mjbvz mjbvz closed this as completed in 8ac2c23 Dec 14, 2018
@mjbvz mjbvz added the engineering VS Code - Build / issue tracking / etc. label Jan 28, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
engineering VS Code - Build / issue tracking / etc. feature-request Request for new features or functionality typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants