FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Simplify getConvertibleFieldAtPosition · Pull Request #23315 · microsoft/TypeScript · GitHub

Simplify getConvertibleFieldAtPosition - #23315

Merged
2 commits merged into
masterfrom
rm_parent_members
Apr 16, 2018
Merged

Simplify getConvertibleFieldAtPosition#23315
2 commits merged into
masterfrom
rm_parent_members

Conversation

Deleted user (ghost) commented Apr 10, 2018
edited by ghost
Loading

Copy link
Copy Markdown

Had some code review on #22143 but didn't want to delay it any longer. Wenlu Wang (@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 force-pushed the rm_parent_members branch from 0e66efe to 65e879f Compare April 10, 2018 20:30
ghost changed the title Remove unnecessary check Simplify getConvertibleFieldAtPosition Apr 10, 2018
ghost merged commit cc6bc76 into master Apr 16, 2018
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL