Skip to content

Commit

Permalink
feat: add typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlup committed Jul 12, 2021
1 parent 0c3b9f8 commit 3936334
Show file tree
Hide file tree
Showing 6 changed files with 486 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
# Logs
logs
*.log
Expand Down
18 changes: 18 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {
FastifyPluginCallback,
FastifyPluginAsync,
} from 'fastify'

export interface TrapsPluginOptions {
timeout: number,
onSignal: (signal: 'SIGTERM' | 'SIGINT') => {},
onClose: () => {},
onTimeout: (timeout: number) => {},
onError: (error: Error|any) => {},
strict: boolean
}

export const trapsPluginCallback: FastifyPluginCallback<TrapsPluginOptions>;
export const trapsPluginAsync: FastifyPluginAsync<TrapsPluginOptions>;

export default trapsPluginCallback;
Loading

0 comments on commit 3936334

Please sign in to comment.