1 | /// <reference types="node" />
|
2 |
|
3 | type rand = { getByte: () => number };
|
4 |
|
5 | interface RandStatic {
|
6 | new(rand: rand): RandInstance;
|
7 | }
|
8 |
|
9 | interface RandInstance {
|
10 | rand: rand;
|
11 | generate(len: number): Buffer | Uint8Array;
|
12 | }
|
13 |
|
14 | interface BrorandStatic {
|
15 | (len: number): Buffer | Uint8Array;
|
16 | Rand: RandStatic;
|
17 | }
|
18 |
|
19 | declare namespace Brorand {}
|
20 |
|
21 | declare let Brorand: BrorandStatic;
|
22 |
|
23 | export = Brorand;
|