-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use typechecker to determine property types #10558
Conversation
@@ -45,7 +50,9 @@ export const getIdentifierPositions = (source: string | ts.SourceFile, name: str | |||
return false; | |||
} | |||
} | |||
return node.text === name; | |||
// for methods the node.text will not contain characters like () | |||
const cleanName = name.match(/\w+/g)[0] || name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jackofdiamond5 for future improvement: this can probably be resolved with some kind
check and likely the method nodes will have name
or something
ClosingParenthesis = ')', | ||
MemberAccess = '.', | ||
Question = '?' | ||
} | ||
|
||
export class MemberInfo implements Pick<tss.DefinitionInfo, 'name' | 'fileName'> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while this is related to members, this isn't the member info - it's still the definition info for whatever we looked up at a position and it's usually the container type of the member instead :) Don't much care for the name ATM, just saying it's not quite right.
Closes #10572
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)