From d2c512b61ab3a4584711d454885b2f88f6fca262 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Mon, 13 Jan 2025 16:30:03 +0100 Subject: [PATCH] Fix types test Signed-off-by: Matteo Collina --- types/plugin.test-d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/types/plugin.test-d.ts b/types/plugin.test-d.ts index 788648d..21b5ffa 100644 --- a/types/plugin.test-d.ts +++ b/types/plugin.test-d.ts @@ -95,15 +95,15 @@ expectType>(fastifyPlug const server = fastify() server.register(fastifyPlugin(pluginCallback)) -server.register(fastifyPlugin(pluginCallbackWithTypes)) -server.register(fastifyPlugin(pluginCallbackWithOptions)) -server.register(fastifyPlugin(pluginCallbackWithServer)) -server.register(fastifyPlugin(pluginCallbackWithTypeProvider)) +server.register(fastifyPlugin(pluginCallbackWithTypes), { foo: 'bar' }) +server.register(fastifyPlugin(pluginCallbackWithOptions), { foo: 'bar' }) +server.register(fastifyPlugin(pluginCallbackWithServer), { foo: 'bar' }) +server.register(fastifyPlugin(pluginCallbackWithTypeProvider), { foo: 'bar' }) server.register(fastifyPlugin(pluginAsync)) -server.register(fastifyPlugin(pluginAsyncWithTypes)) -server.register(fastifyPlugin(pluginAsyncWithOptions)) -server.register(fastifyPlugin(pluginAsyncWithServer)) -server.register(fastifyPlugin(pluginAsyncWithTypeProvider)) +server.register(fastifyPlugin(pluginAsyncWithTypes), { foo: 'bar' }) +server.register(fastifyPlugin(pluginAsyncWithOptions), { foo: 'bar' }) +server.register(fastifyPlugin(pluginAsyncWithServer), { foo: 'bar' }) +server.register(fastifyPlugin(pluginAsyncWithTypeProvider), { foo: 'bar' }) // properly handling callback and async fastifyPlugin(function (fastify, options, next) {