-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
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
Correct type of request not recognized when using withCookies and withContent #19
Comments
I ran into this problem today and solved it like this: Create a path and a file to track custom types interface Request {
content?: any;
cookies?: any;
params?: any;
} Add this line in {
"compilerOptions": {
"typeRoots": ["./src/@types"],
},
} For reference: |
Hi @mkuchak, thanks for sharing. Do you know if this solution would extend or replace the Request interface? |
This extends the interface Request |
I have the following function that I cannot get to recognize the request when using the withCookies and withContent middleware.
I tried using
import { Request as IttyRequest} from 'itty-router'
but I getProperty 'content' does not exist on type 'Request'
Can someone tell me how I can get the right type?
The text was updated successfully, but these errors were encountered: