-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] fix IVectorLayer.getStyle typing #75829
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
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.
thanks for the fix.
It seems the main issue is that HeatmapLayer
inherits from VectorLayer
so it can re-use some implementation, but it isn't really necessary wrt. how style-types and layer-types relate. In hindsight, the union-type seems like a band-aid to that decision.
As discussed offline, another approach to consider is to avoid the need for a union-type and the required type-checking in the dynamic_style_property
altogether by removing the IVectorStyle.getStyle
-override. The implementation VectorLayer.getStyle():IVectorStyle
remains, and HeatmapLayer.getStyle():HeatmapStyle
is implied (since that is still .js).
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
* [Maps] fix IVectorLayer.getStyle typing * update typing in VectorLayer type definition * fix unit tests * review feedback
fixes #75681