Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0151e30

Browse files
feat: Default WorkflowHandle generic T parm to Workflow (temporalio#419)
1 parent ff2e498 commit 0151e30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/client/src/workflow-client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import { Connection, WorkflowService } from './connection';
6767
* await handle.result(); // throws WorkflowExecutionCancelledError
6868
* ```
6969
*/
70-
export interface WorkflowHandle<T extends Workflow> extends BaseWorkflowHandle<T> {
70+
export interface WorkflowHandle<T extends Workflow = Workflow> extends BaseWorkflowHandle<T> {
7171
/**
7272
* Query a running or completed Workflow.
7373
*
@@ -106,7 +106,7 @@ export interface WorkflowHandle<T extends Workflow> extends BaseWorkflowHandle<T
106106
* This interface is exactly the same as {@link WorkflowHandle} except it
107107
* includes the `originalRunId` returned after starting a new Workflow.
108108
*/
109-
export interface WorkflowHandleWithRunId<T extends Workflow> extends WorkflowHandle<T> {
109+
export interface WorkflowHandleWithRunId<T extends Workflow = Workflow> extends WorkflowHandle<T> {
110110
/**
111111
* The runId of the initial run of the bound Workflow
112112
*/
@@ -195,7 +195,7 @@ export interface WorkflowResultOptions {
195195
/**
196196
* Options for starting a Workflow
197197
*/
198-
export type WorkflowStartOptions<T extends Workflow> = WithWorkflowArgs<T, WorkflowOptions>;
198+
export type WorkflowStartOptions<T extends Workflow = Workflow> = WithWorkflowArgs<T, WorkflowOptions>;
199199

200200
/**
201201
* Client for starting Workflow executions and creating Workflow handles

0 commit comments

Comments
 (0)