From 7cc9fb1a9dd35b015e08f44d213c8ecb098b372b Mon Sep 17 00:00:00 2001 From: Joe MacMahon Date: Wed, 22 Aug 2018 12:07:39 +0100 Subject: [PATCH] random-js: make engine optional for uuid4() --- types/random-js/index.d.ts | 2 +- types/random-js/random-js-tests.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/random-js/index.d.ts b/types/random-js/index.d.ts index ff1417b681..86926b9beb 100644 --- a/types/random-js/index.d.ts +++ b/types/random-js/index.d.ts @@ -27,7 +27,7 @@ interface Random { sample(population: T[], sampleSize: number): T[]; die(sideCount: number): number; dice(sideCount: number, dieCount: number): number[]; - uuid4(engine: Random.Engine): string; + uuid4(engine?: Random.Engine): string; string(engine: Random.Engine, length: number): string; string(length?: number, pool?: string): string; hex(length?: number, upperCase?: boolean): string; diff --git a/types/random-js/random-js-tests.ts b/types/random-js/random-js-tests.ts index ef438e18c5..936a2a4693 100644 --- a/types/random-js/random-js-tests.ts +++ b/types/random-js/random-js-tests.ts @@ -86,7 +86,8 @@ sampled = random.sample(customTypeArray, 2); numeric = random.die(5); dieValues = random.dice(5, 2); -uuid = Random.uuid4(engine); +uuid = random.uuid4(engine); +uuid = random.uuid4(); str = random.string(); str = random.string(10);