Opteo / google-ads-api

Google Ads API client library for Node.js
https://opteo.com
MIT License
270 stars 90 forks source link

Fix hook examples on README #417

Closed angelbt91 closed 2 years ago

angelbt91 commented 2 years ago

Hello!

I tinkered a little bit with the library and I found out that the hook examples in README are not following the type definitions, so those examples return a type error.

Currently, the examples include a hook property inside the first argument of the Customer() method. But such first argument follows the CustomerOptions interface, which doesn't have that hooks property.

Actually, the method Customer() accepts two arguments, the second one being the designated to include the hooks (following the Hooks interface).

This PR updates the hook examples in README to make it compliant with the library and the type definitions.

Not an expert on this library, so double-check of what I'm saying is recommended :)

Hope it helps! :raised_hands:

kritzware commented 2 years ago

Thanks for spotting this @angelbt91, much appreciated! 🏅