Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Apr 10, 2018

Had some code review on #22143 but didn't want to delay it any longer. @Kingwl

  • PropertyDeclaration#parent is always a ClassLikeDeclaration. (In other contexts we use a PropertyAssignment or PropertySignature node instead. I know it's hard to keep track of all of these...)
  • There were some unnecessary checks: members is not an optional property (and besides, it must contain at least propertyDeclaration).
  • The get*Info functions share a lot in common, so it's simpler to check declaration.kind only when necessary.

@ghost ghost requested review from mhegazy and amcasey April 10, 2018 20:13
@ghost ghost force-pushed the rm_parent_members branch from 0e66efe to 65e879f Compare April 10, 2018 20:30
@ghost ghost changed the title Remove unnecessary check Simplify getConvertibleFieldAtPosition Apr 10, 2018
@ghost ghost merged commit cc6bc76 into master Apr 16, 2018
@ghost ghost deleted the rm_parent_members branch April 16, 2018 16:30
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant