We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#289 was not enough as I missed another typo:
FastifyPluginCallback should be imported from fastify, not from fastify-plugin.
FastifyPluginCallback
fastify
fastify-plugin
Actually, I'd recommend to follow typings best practices:
Here is my take for index.d.ts:
index.d.ts
import { FastifyPluginCallback } from 'fastify' type FastifyTrapsPlugin = FastifyPluginCallback<fastifyTraps.FastifyTrapsOptions> declare namespace fastifyTraps { export interface FastifyTrapsOptions { timeout?: number onSignal?: (signal: 'SIGTERM' | 'SIGINT') => void onClose?: () => void onTimeout?: (timeout: number) => void onError?: (error: Error|any) => void strict?: boolean } export const fastifyTraps: FastifyTrapsPlugin export { fastifyTraps as default } } declare function fastifyTraps( ...params: Parameters<FastifyTrapsPlugin> ): ReturnType<FastifyTrapsPlugin> export = fastifyTraps
The text was updated successfully, but these errors were encountered:
Thanks @dev101 for reporting this, would like to open a PR?
Sorry, something went wrong.
Update typings
1e5ed5d
Fix dnlup#325
cf3a7b9
Fix #325
Successfully merging a pull request may close this issue.
#289 was not enough as I missed another typo:
FastifyPluginCallback
should be imported fromfastify
, not fromfastify-plugin
.Actually, I'd recommend to follow typings best practices:
Here is my take for
index.d.ts
:The text was updated successfully, but these errors were encountered: