UNPKG

588 BTypeScriptView Raw
1declare namespace Randomstring {
2 type Charset =
3 | "alphanumeric"
4 | "alphabetic"
5 | "numeric"
6 | "hex"
7 | "binary"
8 | "octal"
9 | string & {};
10 type Capitalization = "lowercase" | "uppercase";
11 interface GenerateOptions {
12 length?: number | undefined;
13 readable?: boolean | undefined;
14 charset?: Charset | undefined;
15 capitalization?: Capitalization | undefined;
16 }
17
18 function generate(options?: GenerateOptions | number): string;
19}
20
21declare module "randomstring" {
22 export = Randomstring;
23}