cloudflare / cloudflare/chanfana

Docs Issue: middleware Typescript errors

Open
#273 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
766
Forks
70
Avg merge
25m
Merged PRs (30d)
4

Description

Docs listed here produce typescript errors - https://chanfana.pages.dev/advanced-topics-patterns#middleware-and-interceptors

```
No overload matches this call.
The last overload gave the following error.
Argument of type 'typeof ProtectedEndpoint' is not assignable to parameter of type 'H<{ Bindings: Env; }, "/protected", BlankInput, Promise>'.ts(2769)
types.d.ts(774, 5): The last overload is declared here.
```

Any ideas?

Contributor guide

Open the contributing guide

Research direction

Open the middleware and interceptors section at the linked documentation page and reproduce the reported TypeScript error. Trace the example and its type-checking context; done means the documented middleware example no longer produces the reported overload error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.