diff --git a/lib/index.d.ts b/lib/index.d.ts new file mode 100644 index 0000000..be31aff --- /dev/null +++ b/lib/index.d.ts @@ -0,0 +1,11 @@ +declare module 'foswig' { + class Foswig { + constructor(order: number); + + addWordsToChain(words: string[]): void; + addWordToChain(word: string): void; + generateWord(minLength?: number, maxLength?: number, allowDuplicates?: boolean, maxAttempts?: number): string; + } + + export = Foswig; +} \ No newline at end of file diff --git a/package.json b/package.json index 1636bec..48916dd 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.1.1", "description": "A library that can generate legible pseudo random words based off an input dictionary using markov chains", "main": "./lib/index.js", + "types": "./lib/index.d.ts", "dependencies": {}, "devDependencies": { "chai": "^1.9.1",