temporalio / temporalio/sdk-typescript

[Bug] Inconsistent Type Definition of Workflow Arguments

Open
#1,389 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
917
Forks
224
Avg merge
3d 16h
Merged PRs (30d)
43

Description

What are you really trying to do?

I'm working on creating a reusable generic type that extends from the Workflow type.

Describe the bug

The type definition of arguments on the Workflow type is inconsistent with the condition expression on WithWorkflowArgs type.
This inconsistency could become problematic when attempting to create a generic type that extends the Workflow type.

Minimal Reproduction

Not applicable.

Environment/Versions

Not applicable.

Additional context

Not applicable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Workflow definition in packages/common/src/interfaces.ts and the WithWorkflowArgs condition in packages/common/src/workflow-options.ts, using the linked locations as entry points. Compare their argument types and identify the intended consistent contract; done means generic types extending Workflow are accepted without the reported type inconsistency.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.