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

refactor(operators): Adjust mapResponse type signature to use any as default error type #4697

Closed

Conversation

itbrandonsilva
Copy link

@itbrandonsilva itbrandonsilva commented Feb 8, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

Minor type convenience change.

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

The error type E in mapResponse is inferred as unknown which is generally unnatural when working with errors.

What is the new behavior?

The error type E now defaults to any when it isn't inferred.

Does this PR introduce a breaking change?

[x] Yes
[x] No

I don't see a scenario where depending on E being unknown by default is natural, but this would ultimately be a breaking change if there is dependence on the existing behavior.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 8081f1e
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/67a6be493468a6000838f0ed

@itbrandonsilva itbrandonsilva force-pushed the map-response-error-type branch 2 times, most recently from 3ce0f13 to 8081f1e Compare February 8, 2025 02:15
@itbrandonsilva itbrandonsilva changed the title Adjust mapResponse type signature to use any as default error type refactor(operators): Adjust mapResponse type signature to use any as default error type Feb 8, 2025
@itbrandonsilva itbrandonsilva changed the title refactor(operators): Adjust mapResponse type signature to use any as default error type refactor(operators): Adjust mapResponse type signature to use any as default error type Feb 8, 2025
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