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.

TypeScript types don't match the current version

See original GitHub issue

Describe the bug

The bug is pretty simple – the TypeScript types of this module (@types/uuid) don’t match the current version of uuid (right now, 8.3.0). Eg., the validate function and NIL are unknown. Hence it’s not possible to use uuid 8.3.0 with these functions in a TypeScript project, unless you tell the compiler to ignore errors. It would be great to have updated types 😊

How to reproduce

  • Create a TypeScript project
  • Install uuid@8.3.0 and `@types/uuid@8.0.0``
  • Import the validate function or the NIL property into your code
  • Try to compile

Expected behavior

The project should compile.

Runtime

Is not relevant for this issue, as it is not runtime-specific.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
ctavancommented, Aug 12, 2020

@types/uuid@8.3.0 has finally been published. Feel free to reopen if it doesn’t meet your needs!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript types don't match actual node code #439 - GitHub
What is the current behavior? When using pusher-js-5.1.1 with node, the bundled TypeScript types match the readme, but the actual node code ...
Read more >
Unable to get typescript typings to match - Stack Overflow
But the typings don't seem to match when I call the second function. Type 'Error | number[]' is not assignable to type 'number[]'....
Read more >
Documentation - Advanced Types - TypeScript
This page lists some of the more advanced ways in which you can model types, it works in tandem with the Utility Types...
Read more >
Documentation - TypeScript 4.5
TypeScript 4.5 introduces a way to override a specific built-in lib in a manner similar to how @types/ support works. When deciding which...
Read more >
Documentation - Do's and Don'ts - TypeScript
Don't ever use the types Number , String , Boolean , Symbol , or Object These types ... functions to be passed in...
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