Skip to content

Commit

Permalink
Use lenient resolver type (#956)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mdmower-csnw authored Aug 31, 2024
1 parent f20b1c9 commit 826ba62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export type OperationHandlerOptions = {
handlersPath: string,
route: RouteMetadata,
apiDoc: OpenAPIV3.Document,
) => RequestHandler | Promise<RequestHandler>;
) => unknown;
};

export type Format = {
Expand Down

0 comments on commit 826ba62

Please sign in to comment.