You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeLetters='a'|'b'|'c'|'d'|'e';typeNumbers=1|2|3;typeChars='$'|'_';typeNames= `${Letters}${Uppercase<Letters>}${Numbers}${Chars}`;// Quick fix available// so computed properties, transforms, and long lists workconstnames: {[KinNames]: K}={};
typeLetters='a'|'b'|'c'|'d'|'e';typeNumbers=1|2|3;typeChars='@'|'!';// Difference is only this linetypeNames= `${Letters}${Uppercase<Letters>}${Numbers}${Chars}`;// Quick not availableconstnames: {[KinNames]: K}={};
The last example works in WebStorm via "implement all members" and would be a welcome addition to VSCode. The quick fix for microsoft/TypeScript#28491 was implemented via microsoft/TypeScript#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).
@TrevorSayre What's the expected outcome here? I suppose you'd want it to be populated with all of the different combinations?
That's correct. Ideally both the indicated property names and values (when known) instead of the current undefined value. The working examples show this.
Thanks for updating with those details! I'll try to get around to it in the next couple of weeks. I'm not working with Typescript much anymore, so any contributions are welcome.
The last example works in WebStorm via "implement all members" and would be a welcome addition to VSCode. The quick fix for microsoft/TypeScript#28491 was implemented via microsoft/TypeScript#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: