question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typings are messed up

See original GitHub issue

When importing version 2.0.3, TypeScript types are completely messed up:

  1. 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.
  2. 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.
  3. The library uses any as type anywhere. Options dictionaries, callbacks, etc: these are things that should be explicitly typed.
  4. The library still uses JSDoc types everywhere, which should be migrated to TypeScript definitions.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:16

github_iconTop GitHub Comments

5reactions
ItalyPaleAlecommented, Sep 13, 2018

Almost all methods have wrong typings. I showed one just as example.

3reactions
mattwelkecommented, Oct 10, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found