From 0263c96c0625e970bf446d5da2feb2419cabe791 Mon Sep 17 00:00:00 2001 From: Kuniwak Date: Fri, 18 Sep 2015 20:45:26 +0900 Subject: [PATCH] Add definitions for unique-random --- unique-random/unique-random-tests.ts | 5 +++++ unique-random/unique-random.d.ts | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 unique-random/unique-random-tests.ts create mode 100644 unique-random/unique-random.d.ts diff --git a/unique-random/unique-random-tests.ts b/unique-random/unique-random-tests.ts new file mode 100644 index 0000000000..428d1c77ee --- /dev/null +++ b/unique-random/unique-random-tests.ts @@ -0,0 +1,5 @@ +/// + +import uniqueRandom = require("unique-random"); +const rand = uniqueRandom(1, 10); +const num: number = rand(); diff --git a/unique-random/unique-random.d.ts b/unique-random/unique-random.d.ts new file mode 100644 index 0000000000..caa467bdaf --- /dev/null +++ b/unique-random/unique-random.d.ts @@ -0,0 +1,10 @@ +// Type definitions for unique-random +// Project: https://github.com/sindresorhus/unique-random +// Definitions by: Yuki Kokubun +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "unique-random" { + function uniqueRandom(min: number, max: number): () => number; + + export = uniqueRandom; +}