googleapis / google-cloud-node

Google Cloud Client Library for Node.js
https://cloud.google.com/nodejs
Apache License 2.0
2.91k stars 591 forks source link

TypeScript type definitions #952

Closed laurentgoudet closed 4 years ago

laurentgoudet commented 8 years ago

UPDATE: We are going to do this across the board. We will use this issue to track each repository.


Now that TypeScript has a much better support for the npm ecosystem (https://github.com/Microsoft/TypeScript/wiki/Typings-for-npm-packages), it'll be great if you guys could ship type definitions alongside the package. Maybe there's way to do it during release from the dox JSON output files.

JustinBeckwith commented 4 years ago

Greetings @garyo! That is the one module that likely won't be getting types 😬 I would highly recommend using https://github.com/googleapis/google-api-nodejs-client instead.

garyo commented 4 years ago

I see, thanks @JustinBeckwith . I'll check out this new module. If that old module is deprecated (?) then maybe something in the README would be useful. There's a lot of examples floating around out there using @google-cloud/compute.

Hmm, just looking at google-api-nodejs-client, there's no doc for compute at all... see https://googleapis.dev/nodejs/googleapis/latest -- should I file an issue there?

JustinBeckwith commented 4 years ago

Yeah, it's not deprecated as of now, but there's so much code it would take a very, very long time to support types. On the samples - great point! Before we even considered deprecating that module, we would need to have a plan in place.

JustinBeckwith commented 4 years ago

Folks - I think we're ready to call this one :) There may be one or two stragglers out there, but we should be able to follow up as needed with package specific bugs. Thanks for being patient here! And please do let us know if we missed anything.

chadbr commented 4 years ago

Great work @JustinBeckwith and team -- really appreciate it

JustinBeckwith commented 4 years ago

@alexander-fenster, @xiaozhenliu-gg5, @summer-ji-eng, @bcoe, @jkwlui did all the real work 🙃

Fryuni commented 4 years ago

@garyo did you open an issue about the missing compute documentation on google-api-nodejs-client? I'd like to follow that

garyo commented 4 years ago

Yes, it's https://github.com/googleapis/google-api-nodejs-client/issues/1915 -- still open.

garyo commented 3 years ago

@JustinBeckwith wrote:

Greetings @garyo! That is the one module that likely won't be getting types 😬 I would highly recommend using https://github.com/googleapis/google-api-nodejs-client instead.

Just saw something you may find interesting: https://github.com/googleapis/nodejs-compute/pull/534 -- It looks like it adds type decls to the compute module googleapis/nodejs-compute.

moreiravictor commented 3 years ago

How can I import types for cloud-vision? I can't find a way to do it. Seems it's all not exported :/

JustinBeckwith commented 3 years ago

@moreiravictor what have you tried?

moreiravictor commented 3 years ago

@JustinBeckwith tried importing it from @google-cloud/vision module