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.

I’ve been using the delay module in a typescript module (@google-cloud/profiler).

I’d previously used the type definitions from DefinitelyTyped, so @types/delay, without issue. But when I try to use version 3.1.0 of this module (and use the types from this latest version), my module no longer compiles, and I get errors like:

ts/test/test-time-profiler.ts:65:16 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof import("/usr/local/google/home/nolanmar/cloud-profiler-nodejs-working/cloud-profiler-nodejs/node_modules/delay/index")' has no compatible call signatures.

65          await delay(2 * durationMillis);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~

Is this expected? Any advice for how I can migrate to version 3.1.0 of `delay?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sindresorhuscommented, Aug 21, 2018

@dmitry-korolev It’s not a breaking change. I can’t be responsible for externally created type definitions.

Relevant: https://github.com/Microsoft/TypeScript/issues/19283

0reactions
dmitry-korolevcommented, Aug 21, 2018

This looks like a breaking change to me 😕 Didn’t notice this change because I always use allowSyntheticDefaultImports in my projects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using units to solve problems (practice) - Khan Academy
Khan Academy is a nonprofit with the mission of providing a free, world-class education for anyone, anywhere. ... Using units to solve problems....
Read more >
Using inequalities to solve problems (practice) - Khan Academy
Khan Academy is a nonprofit with the mission of providing a free, world-class education for anyone, anywhere. ... Using inequalities to solve problems....
Read more >
Using units to solve problems: Toy factory - Khan Academy
In word problems that involve multiple quantities, we can use the units of the quantities to guide our solution. In this video, we...
Read more >
Using units to solve problems: Road trip | Khan Academy
In word problems that involve multiple quantities, we can use the units of the quantities to guide our solution. In this video, we...
Read more >
Using inequalities to solve problems | Algebra I | Khan Academy
We can use inequalities to solve problems in a given context. ... Using inequalities to solve problems | Solving equations & inequalities ...
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