Skip to content

Commit

Permalink
Add typescript bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
stretchkennedy committed Jun 15, 2022
1 parent 8a95fdf commit 7bb5be8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions index.d.ts
@@ -0,0 +1,18 @@
declare type WordsOptions = {
min?: number;
max?: number;
exactly?: number;
maxLength?: number;
wordsPerString?: number;
seperator?: string;

This comment has been minimized.

Copy link
@andreigec

andreigec Jul 2, 2022

Contributor

separator :)

formatter?: (word: string, index: number) => string;
};

declare type JoinedWordsOptions = WordsOptions & { join: string; };

declare function words(count: number): string[];
declare function words(options: WordsOptions): string[];
declare function words(options: JoinedWordsOptions): string;

export const wordsList: string[];
export default words;

0 comments on commit 7bb5be8

Please sign in to comment.