Skip to content

fix(googlemaps): accept mixed LatLng | WeightedLocation array in HeatmapLayer.setData#50423

Merged
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
crisbeto:heatmap-mixed-array
Jan 6, 2021
Merged

fix(googlemaps): accept mixed LatLng | WeightedLocation array in HeatmapLayer.setData#50423
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
crisbeto:heatmap-mixed-array

Conversation

@crisbeto
Copy link
Copy Markdown
Contributor

@crisbeto crisbeto commented Jan 6, 2021

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

Please fill in this template.

If changing an existing definition:

…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
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Jan 6, 2021

@crisbeto Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

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"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @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 Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Jan 6, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

👋 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 📊
master #50423 diff
Batch compilation
Memory usage (MiB) 83.0 82.6 -0.5%
Type count 13082 13087 0%
Assignability cache size 4438 4442 0%
Language service
Samples taken 1907 1919 +1%
Identifiers in tests 1907 1919 +1%
getCompletionsAtPosition
    Mean duration (ms) 428.8 444.6 +3.7%
    Mean CV 7.9% 8.4%
    Worst duration (ms) 658.2 698.8 +6.2%
    Worst identifier name addListener
getQuickInfoAtPosition
    Mean duration (ms) 434.5 450.4 +3.7%
    Mean CV 7.9% 8.3%
    Worst duration (ms) 608.3 645.5 +6.1%
    Worst identifier createElement createElement

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Jan 6, 2021
Copy link
Copy Markdown
Contributor

@simonhaenisch simonhaenisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Jan 6, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

@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:

Ready to merge

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.)

@crisbeto
Copy link
Copy Markdown
Contributor Author

crisbeto commented Jan 6, 2021

Ready to merge

@typescript-bot typescript-bot merged commit ba861e3 into DefinitelyTyped:master Jan 6, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

I just published @types/[email protected] to npm.

kaznovac pushed a commit to kaznovac/DefinitelyTyped that referenced this pull request Mar 2, 2021
… | 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants