kwhitley / itty-router

A little router.
MIT License
1.77k stars 78 forks source link

an error re type definitions #116

Closed bkyerv closed 1 year ago

bkyerv commented 2 years ago

An attempt to extract id property from request.params object results in an error saying Property 'id' does not exist on type 'Obj | undefined'. Further attempt to fix it by adding <{id:string}> results in another error saying Type 'Obj | undefined' has no signatures for which the type argument list is applicable..

Could you please suggeset what would be the best thing to do in this kind of situation?

kwhitley commented 1 year ago

Closing this, as all previous TS -related issues may or may not apply in the new version 3 (released today)

kwhitley commented 1 year ago

We'll re-open if it remains an issue!