Typings are messed up
See original GitHub issueWhen importing version 2.0.3, TypeScript types are completely messed up:
- It’s impossible to use Promises as returned methods. Taking one method as example:
exists(options: any, callback?: any): void;
. The documentation says that it can be used with Promises too (and it works), but the type definition shows return type as void. - Types are just wrong. In the same method, the JSDoc definition says that the first argument (options) is optional, but the method signature marks it mandatory.
- The library uses
any
as type anywhere. Options dictionaries, callbacks, etc: these are things that should be explicitly typed. - The library still uses JSDoc types everywhere, which should be migrated to TypeScript definitions.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:16
Top Results From Across the Web
Messed-up Typing - Microsoft Word Tips
To undo your messed-up document, first turn off overtype mode by pressing the Insert key again. (The OVR characters on the status bar...
Read more >[SOLVED] Keyboard Typing Wrong Letters (2022) - Driver Easy
Your keyboard keeps typing wrong letters? You're not alone! Many Windows users are reporting it. But the good new is you can fix...
Read more >5 Methods to Fix Keyboard Typing Wrong Letters in Windows ...
How to Fix Keyboard Typing Wrong Characters/Letters/Symbols · Make Sure the NumLock Key Is Disabled · Check the Language Settings · Run the ......
Read more >How to Fix Keyboard Typing Wrong Characters in Windows 10
Is your keyboard is typing the wrong characters on Windows 10? We'll introduce you to some quick and easy solutions to restore it....
Read more >How to Solve Common Keyboard and Typing Problems
Here are answers to some of the most common typing problems, from disappearing text to jumping cursors.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Almost all methods have wrong typings. I showed one just as example.
We haven’t moved to 2.x yet. But I see in the team’s 2.1.0 release (https://github.com/googleapis/nodejs-storage/releases/tag/v2.1.0) that they “disable TypeScript as we continue to annotate the project with types”. So it sounds like they’re completely turning off the
d.ts
file generation for now. I tried updating my example project to 2.1.0 to test this, but they haven’t published 2.1.0 to NPM yet. I’m hoping when they publish it, we can go back to using latest version without TypeScript issues.