From 44780ceb3bdb37342499bd2257341b8eab741e0a Mon Sep 17 00:00:00 2001 From: shaenchen Date: Mon, 3 Dec 2018 15:34:31 -0700 Subject: [PATCH] Add type support for error in next callback (#52) --- fastify-plugin.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastify-plugin.d.ts b/fastify-plugin.d.ts index 52f0b22..9a438e7 100644 --- a/fastify-plugin.d.ts +++ b/fastify-plugin.d.ts @@ -18,7 +18,7 @@ declare function fastifyPlugin( ): fastify.Plugin; declare namespace fastifyPlugin { - type nextCallback = () => void; + type nextCallback = (err?: Error) => void; interface PluginOptions { /** Bare-minimum version of Fastify for your plugin, just add the semver range that you need. */ fastify?: string, @@ -34,4 +34,4 @@ declare namespace fastifyPlugin { } } -export = fastifyPlugin; \ No newline at end of file +export = fastifyPlugin;