Skip to content

Commit

Permalink
feat(typescript): add TypeScript typings
Browse files Browse the repository at this point in the history
* Add TypeScript typings

*  fix white space
  • Loading branch information
aluanhaddad authored and Ahmad Nassri committed Mar 12, 2018
1 parent f4da92e commit 734117d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import glob = require('glob')

export = promise

declare const promise: Export

declare type GlobPromise = (pattern: string, options?: glob.IOptions) => Promise<string[]>

declare interface Export extends GlobPromise {
readonly glob: typeof glob
readonly Glob: typeof glob.Glob
readonly hasMagic: typeof glob.hasMagic
readonly sync: typeof glob.sync
readonly promise: GlobPromise
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"license": "ISC",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"keywords": [
"glob",
"promise"
Expand All @@ -35,5 +36,8 @@
},
"peerDependencies": {
"glob": "*"
},
"dependencies": {
"@types/glob": "*"
}
}

0 comments on commit 734117d

Please sign in to comment.