Repository navigation
Conversation
The stream sample's TypeScript output gets the client API and the read iterator that Python has. A client resource takes a service-bound Nexus client, as in Python.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR adds the client target to the TypeScript generator, with the
@nexus.polliterator of temporalio#325.--targets workflow,client, the output gets aclient/package. It has a client extension mixin per service, its own resource classes andget<Resource>.createNexusClient, which can returnclient.nexus.createServiceClient(options). A client resource takes that service-bound client first, and each call uses a new random operation ID.@nexus.pollwith atypescripthelper givesiter<Name>.Long, as in fix(typescript): infer Long from protobuf resource bindings temporalio/nexgen#345.resources.tsimported operation files that it didn't write.Why?
The Python client target of temporalio#344 has no TypeScript half.
How did you test it?
Link to a test plan if any -
stream-client.test.tschecks a create, a rebuilt handle and the read loop with a fake client.tscchecks it and the stream output.