TypeScript
TypeScript copied to clipboard
Isolated declarations quick fix results in redundant type arguments when the RHS is a new expression with explicit type arguments
Acknowledgement
- [X] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
Comment
// @declaration: true
// @isolatedDeclarations: true
export const s = new Set<string>();
After generating and applying a quick-fix, the current resulting code is:
export const s: Set<string> = new Set<string>();
An ideal fix would remove the redundant type arguments in the RHS expression when adding the same type arguments to the suggested type annotation, resulting in something like:
export const s: Set<string> = new Set();