cloudflare / worker-template-router

231 stars 85 forks source link

typeof r.conditions === 'function', this case is unreachable #30

Closed emindeniz99 closed 3 years ago

emindeniz99 commented 4 years ago

I have tried to write TypeScript types, but I cant find any case that r.conditions are function.

if (typeof r.conditions === 'function') {
        return r.conditions(req)
      } 

That block seems unreachable.

routes array consist of [Function,Function] or [] (empty array)

return this.handle([Trace, Path(url)], handler) return this.handle([], handler)

kristianfreeman commented 3 years ago

Closed due to rewrite in #35