Skip to content

Commit

Permalink
Merge pull request #15 from sbj42/add-types
Browse files Browse the repository at this point in the history
Fix issue #14 - add TypeScript declarations
  • Loading branch information
mrsharpoblunto committed Oct 13, 2018
2 parents bc5160d + 5f60596 commit 3cf1280
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 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;
}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -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",
Expand Down

0 comments on commit 3cf1280

Please sign in to comment.