fix(googlemaps): accept mixed LatLng | WeightedLocation array in HeatmapLayer.setData#50423
Conversation
…mapLayer.setData According to the Google Maps API docs, `HeatmapLayer.setData` accepts either a mixed `MVCArray<LatLng | WeightedLocation>` or a native mixed array of `LatLng` and `WeightedLocation`, however the current typings only allow a mixed `MVCArray` or a `LatLng[]` or `WeightedLocation[]`. These changes align the type to the one in the docs. I've also replaced the `any` in `HeatmapLayerOptions.data` with the correct type. More information: https://developers.google.com/maps/documentation/javascript/reference/visualization#HeatmapLayer.setData
|
@crisbeto Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 50423,
"author": "crisbeto",
"headCommitOid": "2c9682d0b57395bb86c3adbf75f016b16acf44b8",
"lastPushDate": "2021-01-06T09:14:30.000Z",
"lastActivityDate": "2021-01-06T13:28:09.000Z",
"maintainerBlessed": false,
"mergeOfferDate": "2021-01-06T12:58:20.000Z",
"mergeRequestDate": "2021-01-06T13:28:09.000Z",
"mergeRequestUser": "crisbeto",
"hasMergeConflict": false,
"isFirstContribution": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "googlemaps",
"kind": "edit",
"files": [
{
"path": "types/googlemaps/googlemaps-tests.ts",
"kind": "test"
},
{
"path": "types/googlemaps/reference/visualization.d.ts",
"kind": "definition"
}
],
"owners": [
"cgwrench",
"Silver-Connection",
"nertzy",
"xaolas",
"mrmcnerd",
"martincostello",
"svenkreiss",
"bolatovumar",
"gauthierm",
"captain-igloo",
"demensky",
"life777",
"simonhaenisch",
"gshigeto",
"Bat-Orshikh",
"jpoehnelt",
"skrylnikov"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "simonhaenisch",
"date": "2021-01-06T12:57:41.000Z",
"isMaintainer": false
}
],
"ciResult": "pass"
} |
|
🔔 @cgwrench @Silver-Connection @nertzy @xaolas @mrmcnerd @martincostello @svenkreiss @bolatovumar @gauthierm @captain-igloo @demensky @life777 @simonhaenisch @gshigeto @Bat-Orshikh @jpoehnelt @skrylnikov — please review this PR in the next few days. Be sure to explicitly select |
|
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
|
@crisbeto Everything looks good here. Great job! I am ready to merge this PR (at 2c9682d) on your behalf. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@cgwrench, @Silver-Connection, @nertzy, @xaolas, @mrmcnerd, @martincostello, @svenkreiss, @bolatovumar, @gauthierm, @captain-igloo, @demensky, @life777, @simonhaenisch, @gshigeto, @Bat-Orshikh, @jpoehnelt, @skrylnikov: you can do this too.) |
|
Ready to merge |
|
I just published |
… | WeightedLocation array in HeatmapLayer.setData by @crisbeto According to the Google Maps API docs, `HeatmapLayer.setData` accepts either a mixed `MVCArray<LatLng | WeightedLocation>` or a native mixed array of `LatLng` and `WeightedLocation`, however the current typings only allow a mixed `MVCArray` or a `LatLng[]` or `WeightedLocation[]`. These changes align the type to the one in the docs. I've also replaced the `any` in `HeatmapLayerOptions.data` with the correct type. More information: https://developers.google.com/maps/documentation/javascript/reference/visualization#HeatmapLayer.setData
According to the Google Maps API docs,
HeatmapLayer.setDataaccepts either a mixedMVCArray<LatLng | WeightedLocation>or a native mixed array ofLatLngandWeightedLocation, however the current typings only allow a mixedMVCArrayor aLatLng[]orWeightedLocation[].These changes align the type to the one in the docs. I've also replaced the
anyinHeatmapLayerOptions.datawith the correct type.More information: https://developers.google.com/maps/documentation/javascript/reference/visualization#HeatmapLayer.setData
Please fill in this template.
npm test <package to test>.If changing an existing definition: