brorand: module definiton added

This commit is contained in:
Ilya Mochalov
2016-01-14 03:13:22 +05:00
parent d1f6bde13f
commit eba795b6a8
+30
View File
@@ -0,0 +1,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/borisyankov/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;
}