DEV Community

randomUUID in TypeScript

Jan Prazak on July 06, 2022

How to add missing support As of today (May 2022) TypeScript type definition files lack Crypto API's randomUUID method. I came up with ...
Collapse
 
brense profile image
Rense Bakker

Whats wrong with npm uuid package? npmjs.com/package/uuid It's cross-platform and they have typescript support: npm i --save-dev @types/uuid

Collapse
 
amarok24 profile image
Jan Prazak

For more advanced features sure! Thanks for the link.
My solution is for people who don't want yet another external library because the built-in Crypto API is all they need.