generated from HugoRCD/nuxt-module-starter
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The middleware appears to work but TypeScript is unhappy with the function signature. Related to this original issue #137.
[createMiddleware().server(evlogErrorHandler)]
Argument of type '<T>(nextOrOptions: ((...args: any[]) => Promise<T>) | { next: (...args: any[]) => Promise<T>; }) => Promise<T>' is not assignable to parameter of type 'RequestServerFn<{}, undefined, unknown>'.
Types of parameters 'nextOrOptions' and 'options' are incompatible.
Type 'RequestServerOptions<{}, undefined>' is not assignable to type '((...args: any[]) => Promise<RequestServerResult<{}, undefined, unknown>>) | { next: (...args: any[]) => Promise<RequestServerResult<{}, undefined, unknown>>; }'.
Type 'RequestServerOptions<{}, undefined>' is not assignable to type '{ next: (...args: any[]) => Promise<RequestServerResult<{}, undefined, unknown>>; }'.
The types returned by 'next(...)' are incompatible between these types.
Type 'RequestServerNextFnResult<{}, undefined, unknown>' is not assignable to type 'Promise<RequestServerResult<{}, undefined, unknown>>'.
Type 'RequestServerResult<{}, undefined, unknown>' is missing the following properties from type 'Promise<RequestServerResult<{}, undefined, unknown>>': then, catch, finally, [Symbol.toStringTag]Reproduction
https://stackblitz.com/edit/github-agzk935e?file=src%2Froutes%2F__root.tsx&view=editor
Logs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working