We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
req
res
I can't pass req as param, why is that?
export const someFunction = ( req: NonNullable<Parameters<typeof getCookie>[1]>['req'], ) => { return getCookie('key', { req }); // req ts error }
Type '(IncomingMessage & { cookies?: TmpCookiesObj | undefined; }) | Request | NextRequest | undefined' is not assignable to type 'Request | NextRequest | undefined'. Type 'IncomingMessage & { cookies?: TmpCookiesObj | undefined; }' is not assignable to type 'Request | NextRequest | undefined'. Type 'IncomingMessage & { cookies?: TmpCookiesObj | undefined; }' is missing the following properties from type 'NextRequest': geo, ip, nextUrl, page, and 20 more.ts(2322)
Using req: OptionsType['req'], gives me exactly the same error
req: OptionsType['req'],
The text was updated successfully, but these errors were encountered:
Facing the same issue. Declaring and passing NonNullable<Parameters<typeof getCookie>[1]> would work, though, but that's not the same.
NonNullable<Parameters<typeof getCookie>[1]>
Sorry, something went wrong.
No branches or pull requests
I can't pass
req
as param, why is that?Using
req: OptionsType['req'],
gives me exactly the same errorThe text was updated successfully, but these errors were encountered: