Skip to content
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

Dedupe some utility code #16862

Merged
merged 1 commit into from
Jun 30, 2017
Merged

Dedupe some utility code #16862

merged 1 commit into from
Jun 30, 2017

Conversation

sandersn
Copy link
Member

  1. convertToArray is a duplicate of arrayFrom
  2. inferFromParameterTypes delegates immediately to inferFromTypes
  3. One usage of arrayFrom instantiated a whole iterator only to take the
    first element, which is the same as calling next.

1. convertToArray is a duplicate of arrayFrom
2. inferFromParameterTypes delegates immediately to inferFromTypes
3. One usage of arrayFrom instantiated a whole iterator only to take the
first element, which is the same as calling `next`.
@sandersn
Copy link
Member Author

Note that I considered getting rid of arrayFrom in favour of iteration-based map/filter utilities, but the places that it's used don't look performance sensitive. They either run once per compilation (command line parsing, etc), during interactive use (getAllPossiblePropertiesOfType), or during error reporting (spelling suggestions)

@sandersn sandersn merged commit 48f4408 into master Jun 30, 2017
@sandersn sandersn deleted the dedupe-some-utility-code branch June 30, 2017 16:47
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
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.

3 participants