1 | // Type definitions for Brorand v1.0.5
|
2 | // Project: https://github.com/indutny/brorand
|
3 | // Definitions by: Ilya Mochalov <https://github.com/chrootsu>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 |
|
6 | /// <reference types="node" />
|
7 |
|
8 |
|
9 | type rand = { getByte: () => number };
|
10 |
|
11 | interface RandStatic {
|
12 | new (rand: rand): RandInstance;
|
13 | }
|
14 |
|
15 | interface RandInstance {
|
16 | rand: rand;
|
17 | generate(len: number): Buffer | Uint8Array;
|
18 | }
|
19 |
|
20 | interface BrorandStatic {
|
21 | (len: number): Buffer | Uint8Array;
|
22 | Rand: RandStatic;
|
23 | }
|
24 |
|
25 | declare namespace Brorand { }
|
26 |
|
27 | declare let Brorand: BrorandStatic;
|
28 |
|
29 | export = Brorand;
|