Files
MK (fengmk2) 88e57e1bcf fix(shims): narrow runWith* return type when callback is async (#864)
* fix(shims): narrow runWith* return type when callback is async

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.

* fix(shims): narrow remaining runWith* return types when callback is async

Extend the Promise<T> overload pattern from PR #864 to the other eight
exported runWith* helpers in the shims directory for consistency, so any
future call site passing an async callback gets the narrower Promise<T>
return type instead of the T | Promise<T> union.

Addresses bonk review on #864.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: James <james@eli.cx>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 09:57:18 +00:00
..
2026-02-24 09:29:39 -06:00

vinext

This file is overwritten from the repo root README.md during prepack. Edit the root README.md instead.