Closed janat08 closed 2 years ago
Yep, itty has no hard requirements around Request/Response at all. Any object with a method + url will suffice, thus we also can't check for headers or anything on the native Request.
There must be an or option (union) that keeps type errors in the most common usage scenario.
On Fri, 13 May 2022 at 20:45 Kevin R. Whitley @.***> wrote:
Closed #108 https://github.com/kwhitley/itty-router/issues/108.
— Reply to this email directly, view it on GitHub https://github.com/kwhitley/itty-router/issues/108#event-6606362781, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWP5ALDZKYDCKONPVNWGILVJZTI7ANCNFSM5V2NJ7JA . You are receiving this because you authored the thread.Message ID: @.***>
It doesn't look like your type definition is extending a request object at all.