Skip to content

Commit

Permalink
typescript definition file (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyek authored and brendanashworth committed Jan 18, 2018
1 parent 23642b0 commit ef2ded6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.3.0",
"description": "Easy library for generating unique passwords.",
"main": "main.js",
"types": "src/generate.d.ts",
"scripts": {
"test": "./node_modules/.bin/mocha",
"coverage": "sh ./test/coverage.sh",
Expand Down
11 changes: 11 additions & 0 deletions src/generate.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
interface Options {
length?: number
numbers?: boolean
symbols?: boolean
uppercase?: boolean
excludeSimilarCharacters?: boolean
exclude?: string
strict?: boolean
}
export function generate (options?: Options): string
export function generateMultiple (amount: number, options?: Options): string[]

0 comments on commit ef2ded6

Please sign in to comment.