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; +}