Add quick fix support for all valid strings for computed properties #46402
Labels
Bug
A bug in TypeScript
Domain: Quick Fixes
Editor-provided fixes, often called code actions.
Effort: Casual
Good issue if you're already used to contributing to the codebase. Harder than "good first issue".
Help Wanted
You can do this
Milestone
Suggestion
Add a quick fix for TypeScript computed properties to "Add missing properties" that supports all valid strings.
🔍 Search Terms
add missing properties
declare missing properties
implement all members
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
The last example works in WebStorm via "implement all members" and would be a welcome addition to VSCode. The quick fix for #28491 was implemented via #44576 and solved some use cases, but not this one.
The error output does already suggest all the missing properties. It seems like the data is available to execute a quick fix.
Such names should be usable:
Additionally, when the quick fix does work, it only adds the properties and sets values as
undefined
even when the value is known (as in the above examples).This issue was inspired by this tweet:
https://twitter.com/majidrazvi/status/1449493443743391746
The text was updated successfully, but these errors were encountered: