forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
brorand.d.ts
30 lines (22 loc) · 638 Bytes
/
brorand.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Type definitions for Brorand v1.0.5
// Project: https://github.com/indutny/brorand
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "brorand" {
type rand = {getByte: () => number};
interface RandStatic {
new (rand: rand): RandInstance;
}
interface RandInstance {
rand: rand;
generate(len: number): Buffer|Uint8Array;
}
interface BrorandStatic {
(len: number): Buffer|Uint8Array;
Rand: RandStatic;
}
namespace Brorand {}
let Brorand: BrorandStatic;
export = Brorand;
}