Get occurrences for 'this' keywords#600
Conversation
There was a problem hiding this comment.
seems odd. Why not have a getThisContainer function instead? and if someone wants a thisContainer or arrowFunction we can have a helper for that (which just uses a common helper).
There was a problem hiding this comment.
The thing is that the original uses all needed to track if an arrow function was encountered. I agree, I may just simplify the logic and make that getThisContainer function which performs the do/while logic.
There was a problem hiding this comment.
Rather than defining two functions, one of which has two nested loops, I would just take a parameter for whether to include arrow functions.
There was a problem hiding this comment.
this will break rename, allowing you to rename "this".
There was a problem hiding this comment.
i would remove this for now. Until we're ready to decide what it means to both findrefs on 'this' as well as what 'rename this' means.
There was a problem hiding this comment.
@ahejlsberg and I felt like renaming this isn't so unheard of, but yes, it is currently broken in this implementation - rename will populate the initial text with the symbol name in VS.
What semantics did you have for findAllRefs on this? While we don't go out of our way to match this across merged declarations, we certainly have fairly predictable results. Thoughts @mhegazy, as we discussed this offline?
Get occurrences for 'this' keywords
No description provided.