Skip to content

[Upstream] fix(typescript): build the returned resource on the System Nexus path - #49

Closed
moetemp wants to merge 1 commit into
moe/up/mainfrom
moe/up/ts-system-nexus-resource-return
Closed

moetemp wants to merge 1 commit into
moe/up/mainfrom
moe/up/ts-system-nexus-resource-return

Conversation

@moetemp

@moetemp moetemp commented Oct 22, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR makes a TypeScript System Nexus operation that returns a resource build the resource from the answer.

The System Nexus branch of the TypeScript operation function returned result as <Resource>. The answer is the resource's wire message, such as StartWorkflowExecutionResponse, not the resource. Now the branch builds the resource from its bindings, as the endpoint branch does: return new StartedWorkflow(request.namespace, request.workflowId, result.runId ?? undefined).

Why?

The cast compiled, but at run time the caller got a plain message with no resource methods and no resource fields. A call to a resource method on it failed.

How did you test it?

tests/generate_typescript.rs generates the start-workflow sample with System Nexus on, and checks that startWorkflow builds a StartedWorkflow. The test fails on main.

cargo test --features advanced passes. cargo build-examples --lang typescript gives no diff. In advanced/samples/typescript, npm run typecheck and npm test pass.

Came from fork PR #45.

@moetemp moetemp changed the title [Upstream] Built the returned resource on the TypeScript System Nexus path. [Upstream] fix: build the returned resource on the TypeScript System Nexus path Oct 22, 2026
@moetemp

moetemp commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

Opened upstream as temporalio#267. The branch stays, since that PR uses it, and #56 builds on it.

@moetemp moetemp closed this Oct 22, 2026
@moetemp moetemp changed the title [Upstream] fix: build the returned resource on the TypeScript System Nexus path fix(typescript): build the returned resource on the System Nexus path Oct 22, 2026
@moetemp moetemp changed the title fix(typescript): build the returned resource on the System Nexus path [Upstream] fix(typescript): build the returned resource on the System Nexus path Oct 22, 2026
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.

1 participant