CustomSearch API typed incorrectly
johnnybarton411 opened this issue · 2 comments
When running gapi.client.load('customsearch', 'v1')
, the gapi.client
Window object is updated to include gapi.client.search
, versus the expected type gapi.client.customsearch
expected by the type definitions that this generator produces.
EDIT: After investigating how to sync the type definitions for this to @DefinitelyTyped/DefinitelyTyped, it seems the syncing between the output for customsearch and DefinitelyTyped is off. The instructions to sync the two specify to only include additions to the PR, and no deletions. I'm not positive on how to do that, and don't want to screw anything up. Any additional instructions would be great and I'd be happy to go through with those PRs.
Hello John!
Thank you for raising the issue.
This is a bug in the older generator that was addressed in #655
PR to update DefinitelyTyped was already opened a month ago, but it seems like the bot doesn't pick it up: DefinitelyTyped/DefinitelyTyped#62106 I've pinged DT maintainers and going to try another workaround.
As part of this PR we're migrating from @types/gapi.client.customsearch
to @types/gapi.client.customsearch-v1
naming convention to support different versions. Old types won't get updates and will be removed eventually.
Also I've double-checked that gapi.client.load('customsearch', 'v1')
creates gapi.client.search
by adding this test: Maxim-Mazurok/gapi@f139b65
TL;DR: use @maxim_mazurok/gapi.client.customsearch-v1
package from npm. Once DefinitelyTyped/DefinitelyTyped#62106 is merged - replace it with @types/gapi.client.customsearch-v1
.
Let me know if you'll have any other questions, cheers!
Thank you for your response (and for creating/maintaining this awesome repo)! Workaround makes sense, thank you.