TypeScript types don't match the current version
See original GitHub issueDescribe 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 theNIL
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:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46395
@types/uuid@8.3.0
has finally been published. Feel free to reopen if it doesn’t meet your needs!