diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..da59d59 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,18 @@ +declare type WordsOptions = { + min?: number; + max?: number; + exactly?: number; + maxLength?: number; + wordsPerString?: number; + seperator?: string; + 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;