Skip to content

feat(workflow): support TypeInfo for client-started workflows - #2252

Merged
THardy98 merged 2 commits into
mainfrom
feat/ts-type-hints-workflow-client
Aug 10, 2026
Merged

feat(workflow): support TypeInfo for client-started workflows#2252
THardy98 merged 2 commits into
mainfrom
feat/ts-type-hints-workflow-client

Conversation

@THardy98

@THardy98 THardy98 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What was changed

Added PayloadTypeInfo and defineWorkflowOptions metadata for client-started Workflows. Workflow functions use definition metadata, while string Workflow types can supply metadata at the call site; start, execute, result, detached-handle, signal-with-start, and update-with-start paths carry it through conversion.

This is PR 3 of the stack and depends on #2251. Workflow-internal transitions follow in #2248.

Why?

Workflow input TypeInfo must be available before arguments are decoded in the Workflow isolate. Definition-time metadata provides it for typed function references while preserving a call-site option for string Workflow types.

Workflows without TypeInfo are unchanged. Providing call-site metadata with a Workflow function is rejected to avoid conflicting sources; no rollout or manual steps are required.

Checklist

  1. Closes: N/A

  2. How was this tested: Common, Client, Worker, Workflow, and test package builds; ESLint; Prettier; 10 focused unit tests; and eight mapper-only JSON integration scenarios.

  3. Any docs updates needed? No; documentation will accompany the completed experimental API.

@THardy98
THardy98 force-pushed the feat/ts-type-hints-mapper branch from c1982de to 8c124a3 Compare July 23, 2026 17:06
@THardy98
THardy98 force-pushed the feat/ts-type-hints-workflow-client branch from fa13326 to fd11f11 Compare July 23, 2026 17:06
@THardy98
THardy98 force-pushed the feat/ts-type-hints-mapper branch from 8c124a3 to b7eb29b Compare July 23, 2026 17:29
@THardy98
THardy98 force-pushed the feat/ts-type-hints-workflow-client branch from fd11f11 to d8e2f2e Compare July 23, 2026 17:29
@THardy98
THardy98 force-pushed the feat/ts-type-hints-mapper branch from b7eb29b to d655488 Compare July 23, 2026 18:42
@THardy98
THardy98 force-pushed the feat/ts-type-hints-workflow-client branch from d8e2f2e to 28b503e Compare July 23, 2026 18:42
@THardy98
THardy98 force-pushed the feat/ts-type-hints-mapper branch from d655488 to f6577e8 Compare July 23, 2026 19:38
@THardy98
THardy98 force-pushed the feat/ts-type-hints-workflow-client branch from 28b503e to 68c9a75 Compare July 23, 2026 19:40
@THardy98
THardy98 force-pushed the feat/ts-type-hints-mapper branch from f6577e8 to eb968c5 Compare July 24, 2026 16:47
@THardy98
THardy98 force-pushed the feat/ts-type-hints-workflow-client branch from 68c9a75 to fa07e89 Compare July 24, 2026 16:52
@THardy98
THardy98 force-pushed the feat/ts-type-hints-mapper branch 2 times, most recently from 4152cfb to d9e55da Compare July 31, 2026 01:21
Base automatically changed from feat/ts-type-hints-mapper to main July 31, 2026 14:38
@THardy98
THardy98 marked this pull request as ready for review August 5, 2026 13:24
@THardy98
THardy98 requested a review from a team as a code owner August 5, 2026 13:24
@THardy98
THardy98 force-pushed the feat/ts-type-hints-workflow-client branch from fa07e89 to 74dfbd7 Compare August 5, 2026 16:26
Comment thread CHANGELOG.md

### Added

- **Experimental**: Added `TypeInfo` and `TransferTypeConverter` to `@temporalio/common` for converting

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might need a new section now that 1.22 has been released

@THardy98
THardy98 force-pushed the feat/ts-type-hints-workflow-client branch from 4d14dd1 to b029835 Compare August 10, 2026 16:29
@THardy98
THardy98 requested a review from a team as a code owner August 10, 2026 16:29
@THardy98
THardy98 force-pushed the feat/ts-type-hints-workflow-client branch from b029835 to da45938 Compare August 10, 2026 16:46
@THardy98
THardy98 enabled auto-merge (squash) August 10, 2026 16:46
@THardy98
THardy98 merged commit bbc3196 into main Aug 10, 2026
83 of 91 checks passed
@THardy98
THardy98 deleted the feat/ts-type-hints-workflow-client branch August 10, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants