Skip to content

Commit

Permalink
refactor: add types
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Feb 28, 2023
1 parent 2a0ab74 commit ac0fb78
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,6 @@
"simple-git-hooks": {
"commit-msg": "npx commitlint --edit",
"pre-commit": "npx nano-staged"
}
},
"types": "src/index.d.ts"
}
12 changes: 12 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { IncomingRequest } from 'http'

type Options = {
limit: number
}

export default {
buffer(req: IncomingRequest, options: Options): typeof buffer;
string(req: IncomingRequest, options: Options): string;
json(req: IncomingRequest, options: Options): object;
urlencoded(req: IncomingRequest, options: Options): object;
};

0 comments on commit ac0fb78

Please sign in to comment.