Repository navigation
Conversation
This was referenced Oct 28, 2026
moetemp
force-pushed
the
moe/up/resource-type-parameters
branch
from
October 29, 2026 04:00
fbdc32c to
9791e30
Compare
moetemp
force-pushed
the
moe/up/python-poll
branch
from
October 29, 2026 04:00
12e5348 to
888e56f
Compare
A resource with `@nexus.type-parameter "<alias>"` is generic in Python, TypeScript and .NET. An operation that returns it, or that its method binds, takes a runtime type for each type parameter of its output, so a response decodes its generic values.
moetemp
force-pushed
the
moe/up/resource-type-parameters
branch
from
October 31, 2026 13:08
9791e30 to
5f8ad4f
Compare
moetemp
changed the base branch from
moe/up/python-poll
to
moe/up/dotnet-client-target
October 31, 2026 13:09
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 lets a resource declare its type parameters, in Python, TypeScript and .NET. With
@nexus.type-parameter "<alias>", the resource class is generic.create_stream(Turn, id=...)returns aStream[Turn].@nexus.protomessage, since neither gives the type arguments.Why?
The proposal's Stream API is generic in its value type, as in
Stream[Turn], so a read must decode the body as the handle's type, not as a raw payload. A resource couldn't use a type parameter at all.How did you test it?
Link to a test plan if any -
The Python, TypeScript and .NET tests read typed values. A parser unit test covers a type parameter alias that
usebrings in from another interface.