@types/randomstring
Version:
TypeScript definitions for randomstring
24 lines (21 loc) • 600 B
TypeScript
declare namespace Randomstring {
type Charset =
| "alphanumeric"
| "alphabetic"
| "numeric"
| "hex"
| "binary"
| "octal"
| string & {};
type Capitalization = "lowercase" | "uppercase";
interface GenerateOptions {
length?: number | undefined;
readable?: boolean | undefined;
charset?: Charset | Charset[] | undefined;
capitalization?: Capitalization | undefined;
}
function generate(options?: GenerateOptions | number): string;
}
declare module "randomstring" {
export = Randomstring;
}