fix: map core types in succinct method return types#54
Closed
klaidliadon wants to merge 1 commit intomasterfrom
Closed
fix: map core types in succinct method return types#54klaidliadon wants to merge 1 commit intomasterfrom
klaidliadon wants to merge 1 commit intomasterfrom
Conversation
c484ee4 to
2832931
Compare
Succinct method outputs used .Type directly (Go Stringer) instead of routing through the typeMap, producing 'bool' instead of 'boolean', 'int64' instead of 'number', etc. Use the 'type' template with typeMap for all succinct output references in client, clientInterface, and serverInterface templates.
2832931 to
4a2449c
Compare
Contributor
Author
|
No longer needed - fixed in the webrpc parser instead (webrpc/webrpc#437). Methods with only one side using inline struct now fall back to non-succinct, which already maps types correctly. |
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.
Summary
Delete(Req) => (ok: bool)) emitted raw RIDL type names (bool) instead of mapped TypeScript types (boolean) in generated client interface, client implementation, and server interface{{(index $method.Outputs 0).Type}}which renders via Go's Stringer, bypassing the$typeMapclientInterfaceandserverInterfaceBefore:
deleteProject(req: DeleteProjectRequest): Promise<bool>After:
deleteProject(req: DeleteProjectRequest): Promise<boolean>Files changed
clientInterface.go.tmpl— use{{template "type" ...}}+ handle voidclient.go.tmpl— use{{template "type" ...}}for return type,isCoreTypeguard for$methodRespNameserverInterface.go.tmpl— use{{template "type" ...}}+ handle void