guid.d.ts 941 B

12345678910111213141516171819
  1. /**
  2. * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523
  3. * Be aware Math.random() could cause collisions, but:
  4. * "All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide"
  5. * @returns a pseudo random id
  6. */
  7. export declare function RandomGUID(): string;
  8. /**
  9. * Class used to manipulate GUIDs
  10. */
  11. export declare const GUID: {
  12. /**
  13. * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523
  14. * Be aware Math.random() could cause collisions, but:
  15. * "All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide"
  16. * @returns a pseudo random id
  17. */
  18. RandomId: typeof RandomGUID;
  19. };