From 826ba62abaf782b414fb8f0745f5c2509f631d68 Mon Sep 17 00:00:00 2001 From: Matt Mower <135273348+mdmower-csnw@users.noreply.github.com> Date: Sat, 31 Aug 2024 11:44:41 -0700 Subject: [PATCH] Use lenient resolver type (#956) In #921, a stronger type applied to OperationHandlerOptions['resolver'] so that end users would have an idea of what the parameters are for their custom resolvers. It went too far in stipulating a return type. Set the return type to unknown and let users decide how much type safety they need in their resolver. Fixes #952 --- src/framework/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/types.ts b/src/framework/types.ts index 9d4d0c65..792da9ad 100644 --- a/src/framework/types.ts +++ b/src/framework/types.ts @@ -68,7 +68,7 @@ export type OperationHandlerOptions = { handlersPath: string, route: RouteMetadata, apiDoc: OpenAPIV3.Document, - ) => RequestHandler | Promise; + ) => unknown; }; export type Format = {