kwhitley / itty-router

A little router.
MIT License
1.71k stars 77 forks source link

No header type #108

Closed janat08 closed 2 years ago

janat08 commented 2 years ago

It doesn't look like your type definition is extending a request object at all.

kwhitley commented 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.

janat08 commented 2 years ago

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: @.***>