-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Maps] convert HeatmapLayer dependencies to TS #66823
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
@elasticmachine merge upstream |
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.
OK, apart from the small merge-issue. I'd reconsider the rename.
lgtm when green, thx!
const stopNumber = min + (delta * idx) / srcArr.length; | ||
return [...accu, stopNumber, stopColor]; | ||
}, []); | ||
return hexColors.reduce( |
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.
Somewhat unrelated: When seeing these dense signatures, I reminds me of the benefits of using simple loops for simple for simple operations more often, iso these higher order functions.
const switchStatement: Array<number | string> = [];
for (let i = 0; i < hexColors.length; i++) {
const stopNumber = min + (delta * i) / hexColors.length;
switchStatement.push(stopNumber, stopColor);
}
return switchStatement;
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* [Maps] convert HeatmapLayer and dependencies to TS * heatmap_style_editor snapshots * eslint * fix merge problems * eslint cleanup * revert rename of getOrdinalMbColorRampStops * eslint * tslint Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Maps] convert HeatmapLayer and dependencies to TS * heatmap_style_editor snapshots * eslint * fix merge problems * eslint cleanup * revert rename of getOrdinalMbColorRampStops * eslint * tslint Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Prepares for conversion of HeatmpLayer and HeatmapStyle to TS by converting HeatmapLayer dependencies to TS