Skip to content

Commit d9df892

Browse files
authored
fix(workflow): Do not appear to support conflict policy for child workflows (temporalio#1649)
1 parent cca601e commit d9df892

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/test/src/test-interface-type-safety.ts

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
ChildWorkflowHandle,
99
Workflow,
1010
defineUpdate,
11+
ChildWorkflowOptions,
1112
} from '@temporalio/workflow';
1213
import { WorkflowHandle, WorkflowUpdateStage } from '@temporalio/client';
1314

@@ -181,3 +182,11 @@ test('startUpdate and executeUpdate call signatures', async (t) => {
181182
}
182183
t.pass();
183184
});
185+
186+
test('ChildWorkflowOptions workflowIdConflictPolicy', (t) => {
187+
const options: ChildWorkflowOptions = {
188+
// @ts-expect-error: workflowIdConflictPolicy is not a valid option
189+
workflowIdConflictPolicy: 'USE_EXISTING',
190+
};
191+
t.pass();
192+
});

packages/workflow/src/interfaces.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export const [encodeParentClosePolicy, decodeParentClosePolicy] = makeProtoEnumC
412412
'PARENT_CLOSE_POLICY_'
413413
);
414414

415-
export interface ChildWorkflowOptions extends CommonWorkflowOptions {
415+
export interface ChildWorkflowOptions extends Omit<CommonWorkflowOptions, 'workflowIdConflictPolicy'> {
416416
/**
417417
* Workflow id to use when starting. If not specified a UUID is generated. Note that it is
418418
* dangerous as in case of client side retries no deduplication will happen based on the

0 commit comments

Comments
 (0)