-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrandom-words.d.ts
More file actions
35 lines (29 loc) · 874 Bytes
/
random-words.d.ts
File metadata and controls
35 lines (29 loc) · 874 Bytes
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
31
32
33
34
35
declare module "random-words" {
export interface RandomWordListOptions {
/** Minimum number of words to generate */
min?: number;
/** Maximum number of words to generate */
max?: number;
/** Exact number of words to generate */
exactly?: number;
/** Maximum length each random word can have */
maxLength?: number;
wordsPerString?: number;
separator?: string;
formatter?: (string) => string;
}
export interface RandomWordStringOptions extends RandomWordListOptions {
join: string;
}
/**
* Generates a list of random words.
*/
declare function randomWords(
listOptions?: RandomWordListOptions | number,
): string[];
/**
* Generates a string of random words joined by `join`.
*/
declare function randomWords(stringOptions: RandomWordStringOptions): string;
export default randomWords;
}