-
Notifications
You must be signed in to change notification settings - Fork 494
Open
Labels
typesRelated to @cloudflare/workers-typesRelated to @cloudflare/workers-types
Description
Problem:
In the latest version type of ExecutionContext was changed from any to unknown.
Before (version 4.20250816.0):
interface ExecutionContext {
waitUntil(promise: Promise<any>): void;
passThroughOnException(): void;
props: any;
}
After (version 4.20251128.0):
interface ExecutionContext<Props = unknown> {
waitUntil(promise: Promise<any>): void;
passThroughOnException(): void;
readonly exports: Cloudflare.Exports;
readonly props: Props;
}
Because of this change our Typescript compiler is complaining that property that we have in context doesn't exist on unknown.
Proposal:
I am raising a PR where I added option to pass type to ExecutionContext.
Metadata
Metadata
Assignees
Labels
typesRelated to @cloudflare/workers-typesRelated to @cloudflare/workers-types
Type
Projects
Status
In Review