diff --git a/index.d.ts b/index.d.ts index e9b90c9..b2f1f54 100644 --- a/index.d.ts +++ b/index.d.ts @@ -8,8 +8,8 @@ import { declare module "fastify" { interface FastifyInstance { - runInAsyncScope (fn: () => T) : T; - enterWith() : void + runInAsyncScope(fn: () => T): T; + enterWith(): void; } } @@ -18,7 +18,6 @@ declare namespace fastifyasyncforge { export function request(): T; export function reply(): T; export function logger(): T; - export function start(app: FastifyInstance): Promise; } declare function fastifyasyncforge(): FastifyPluginCallback; diff --git a/index.test-d.ts b/index.test-d.ts index 3fc3806..ce4f3a5 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -1,5 +1,5 @@ import { expectAssignable, expectError, expectType } from "tsd"; -import fastifyasyncforge, { app, logger, reply, request, start } from "."; +import fastifyasyncforge, { app, logger, reply, request } from "."; import fastify, { type FastifyInstance, type FastifyBaseLogger, @@ -48,8 +48,3 @@ expectType(logger().info({ msg: "oh!" })); expectType(logger().warn({ msg: "let's go!!!" })); expectError(logger()); expectError({}); - -// start -expectType(await start(fastifyInstance)); -expectError(await start({ invalid: "object" })); -expectError(await start());