Open dimitryzub opened 2 years ago
Our regular google-search-results-nodejs
works with TypeScript too: https://replit.com/@ilyazub/scrape-google-search-serpapi-typescript#src/index.ts
We don't provide type declarations but it still works.
Yes, this is true @dimitryzub, we received such a request on Friday.
@ilyazub Should we mention about it explicitly in our Node integration that it works with TypeScript with no problems?
Maybe we can release a slightly-modified version of google-search-results-nodejs
in TypeScript?
Regarding type contains, I remember @jvmvik had a same issue with Go. He ended up using some sort of "DynamicType" type, interface{}
. Maybe there is something similar in TypeScript.
Let's also take chance to release as searpapi-typescript
for the repo name and serpapi
as the lib name if we do that.
@marm123 When you have time, could you please edit my initial issue comment and add a link to a potential or direct user request so we can back up this decision with data (requests count)? 💛
@marm123 When you have time, could you please edit my initial issue comment and add a link to a potential or direct user request so we can back up this decision with data (requests count)? 💛
Yes, this is true @dimitryzub, we received such a request on Friday.
Yes, can you add the Intercom thread, @marm123? Thank you.
@dimitryzub I've tagged you in the Intercom thread.
I've replied to this user. There's a problem with the Webpack configuration, not TypeScript.
@dimitryzub @hartator @ilyazub Really sorry I've missed this conversation! The notification got lost in my email mailbox. Just in case this is still needed here is the intercom conversation: Intercom
I have also added it to your initial comment @dimitryzub
Once again, sorry for missing that.
I see you recently added limited support for TypesScript. It would be very helpful if you also provided type declarations indicating which fields I can expect to see returned from various engines, especially given that the response structure varies by engine, whether it's async or not, and probably many other variables. I've spent many hours this week reviewing the docs and reverse engineering the types from the responses I get for various searches. I expect this process will continue as I add additional use cases, and that wouldn't be necessary with better type support.
Hi Richard, thanks for your comment.
Unfortunately, we can't provide type declarations for all the fields you can expect to see returned by various engines.
The reason for this is that some of the key names are generated dynamically based on what the search engines provide. We also can never guarantee that any particular field will always be present in the response, as this depends on whether the search engines return them.
I hope that makes sense. If you have any other questions or concerns, you are always more than welcome to email us at support@serpapi.com, or contact us through the chat interface on our website, we will be happy to help.
Another request for TypeScript support. This user is mostly interested in a list of types:
This issue is to track the number of current or potential user requests for adding support for TypeScript.
Request(s) count: 1
Aug 28, 2022: I've received a potential request on Stackoverflow comment about using our API but in TypeScript.
@aliayar, @marm123 does someone wrote you about adding support for TypeScript?
Intercom conversation