-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugConfirmed bugConfirmed buggood first issueGood for newcomersGood for newcomerstypescriptTypeScript relatedTypeScript related
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the issue has not already been raised
Issue
Currently, RouteShorthandOptions type doesn't allow passing async hooks:
export interface RouteShorthandOptions<
// ...
> {
// ...
onRequest?: onRequestHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger>
| onRequestHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger>[];It should be something like that:
export interface RouteShorthandOptions<
// ...
> {
// ...
onRequest?: onRequestHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger>
| onRequestHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger>[]
// Add these two:
| onRequestAsyncHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger>
| onRequestAsyncHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger>[];Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed bugConfirmed buggood first issueGood for newcomersGood for newcomerstypescriptTypeScript relatedTypeScript related