Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2: Correct type inference for ConnectError#findDetails #1188

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

bhollis
Copy link

@bhollis bhollis commented Aug 26, 2024

I noticed a minor issue with the types for findDetails that prevented correct type inference for the return type. e.g.:

const details = e.findDetails(MyDetailsSchema)

I wanted details to be type MyDetails[] but instead it's Message<string>[]. The change in this PR fixes it.

@bhollis bhollis changed the title Correct type inference for ConnectError#findDetails V2: Correct type inference for ConnectError#findDetails Aug 26, 2024
Copy link
Member

@timostamm timostamm left a comment

Choose a reason for hiding this comment

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

Thanks, Ben!

Could you sign the commit? See here for details.

Signed-off-by: Ben Hollis <hollis@stately.cloud>
@bhollis
Copy link
Author

bhollis commented Aug 27, 2024

Updated with signoff

Copy link
Member

@timostamm timostamm left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@timostamm timostamm merged commit ef48f10 into connectrpc:v2 Aug 28, 2024
18 of 20 checks passed
@timostamm timostamm mentioned this pull request Aug 28, 2024
@timostamm timostamm mentioned this pull request Sep 20, 2024
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