Variable aliasing this should be treated the same as this #36618
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
Search Terms
this alias
Suggestion
If I do
const me = this;
thenme
should be treated the same asthis
especially since it's a constant and cannot be updated to another valueUse Cases
I'm using
--allowJs
and--checkJs
. Right now TypeScript makes us do this:Examples
I would like to be able to do this:
This would make our transition to TypeScript much easier since our code follows this pattern throughout the codebase. It would also result in a smaller file size, which is why we'd adopted this pattern.
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: