Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear how to use new types #483

Closed
bamnet opened this issue Apr 28, 2021 · 7 comments · Fixed by #485
Closed

Unclear how to use new types #483

bamnet opened this issue Apr 28, 2021 · 7 comments · Fixed by #485
Labels
documentation Improvements or additions to documentation

Comments

@bamnet
Copy link

bamnet commented Apr 28, 2021

I'm trying to import types that have been generated for gapi.client.apikeys which I see are available at https://github.com/Maxim-Mazurok/google-api-typings-generator/tree/types/gapi.client.apikeys/. This looks like a much better system then manually trying to create some typings based on the documentation / discovery document.

Following the instructions on that README page (npm install @types/gapi.client.apikeys@v2 --save-dev), I get an error that the type isn't published. Is there a different process to install these typings?

$ npm install @types/gapi.client.apikeys@v2 --save-dev
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2fgapi.client.apikeys - Not found
npm ERR! 404 
npm ERR! 404  '@types/gapi.client.apikeys@v2' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
@Maxim-Mazurok
Copy link
Owner

Hello! Not all types in this repository are added to DefinitelyTyped and published to npm (see #401). I'll update types list shortly and will let you know. Meanwhile, you can download d.ts file and put it in your project folder.

@Maxim-Mazurok
Copy link
Owner

Published to NPM: @maxim_mazurok/gapi.client.apikeys, feel free to use it for now (npm install @maxim_mazurok/gapi.client.apikeys)

@types/gapi.client.apikeys will mirror this package, once microsoft/DefinitelyTyped-tools#240 and DefinitelyTyped/DefinitelyTyped#52618 are merged.

@Maxim-Mazurok
Copy link
Owner

Please, consider giving the project a "star" if you like it 😜

@Maxim-Mazurok Maxim-Mazurok added the documentation Improvements or additions to documentation label Apr 28, 2021
@bamnet
Copy link
Author

bamnet commented Apr 28, 2021

Thanks for the quick workaround!

@Maxim-Mazurok
Copy link
Owner

You're welcome! I've added info about this error to the docs in #485, which will close this issue once merged. Cheers!

@Maxim-Mazurok
Copy link
Owner

@bamnet https://www.npmjs.com/package/@types/gapi.client.apikeys was just published, feel free to use it :)

@bamnet
Copy link
Author

bamnet commented May 11, 2021

Woohoo, thanks so much!!! 🥳

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants