Skip to content

fix(shims): narrow runWith* return type when callback is async#864

Open
fengmk2 wants to merge 1 commit intocloudflare:mainfrom
fengmk2:fix/lint-await-thenable-overloads
Open

fix(shims): narrow runWith* return type when callback is async#864
fengmk2 wants to merge 1 commit intocloudflare:mainfrom
fengmk2:fix/lint-await-thenable-overloads

Conversation

@fengmk2
Copy link
Copy Markdown

@fengmk2 fengmk2 commented Apr 21, 2026

Add Promise<T> overloads to runWithRequestContext, runWithHeadersContext, and runWithNavigationContext so async callbacks don't widen the return type to T | Promise<T>. This clears 4 typescript-eslint(await-thenable) warnings where Promise.all received the wider union.

Add Promise<T> overloads to runWithRequestContext, runWithHeadersContext,
and runWithNavigationContext so async callbacks don't widen the return
type to T | Promise<T>. This clears 4 typescript-eslint(await-thenable)
warnings where Promise.all received the wider union.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant