Skip to content

Commit

Permalink
fix: properly expose WorkflowEntrypoint constructor in TS types (#3239
Browse files Browse the repository at this point in the history
)
  • Loading branch information
LuisDuarte1 authored Jan 2, 2025
1 parent ec1bd64 commit d72aa60
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/defines/rpc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ declare module "cloudflare:workers" {
protected ctx: ExecutionContext;
protected env: Env;

constructor(ctx: ExecutionContext, env: Env);

run(event: Readonly<WorkflowEvent<T>>, step: WorkflowStep): Promise<unknown>;
}
}
1 change: 1 addition & 0 deletions types/generated-snapshot/2021-11-03/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5378,6 +5378,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/2022-01-31/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5404,6 +5404,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/2022-03-21/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5429,6 +5429,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/2022-08-04/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5430,6 +5430,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/2022-10-31/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5433,6 +5433,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/2022-11-30/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5438,6 +5438,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/2023-03-01/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5440,6 +5440,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/2023-07-01/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5440,6 +5440,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/experimental/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5519,6 +5519,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/oldest/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5378,6 +5378,7 @@ declare module "cloudflare:workers" {
[Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
protected ctx: ExecutionContext;
protected env: Env;
constructor(ctx: ExecutionContext, env: Env);
run(
event: Readonly<WorkflowEvent<T>>,
step: WorkflowStep,
Expand Down

0 comments on commit d72aa60

Please sign in to comment.