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

feat(store): merge Action and TypedAction intefaces #4318

Merged
merged 1 commit into from
May 7, 2024

Conversation

timdeschryver
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] 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?

Closes #4136
Closes #4183

What is the new behavior?

Does this PR introduce a breaking change?

[x] Yes
[ ] No
BREAKING CHANGE:

The Action and TypedAction interfaces are merged into one interface.

BEFORE:

There was a separation between the Action and TypedAction interfaces.

AFTER:

The Action interface accepts a generic type parameter that represents the payload type (defaults to string).
The TypedAction interface is removed.

Other information

BREAKING CHANGE:

The Action and TypedAction interfaces are merged into one interface.

BEFORE:

There was a separation between the Action and TypedAction interfaces.

AFTER:

The Action interface accepts a generic type parameter that represents the payload type (defaults to string).
The TypedAction interface is removed.
Copy link

netlify bot commented May 7, 2024

Deploy Preview for ngrx-io canceled.

Name Link
🔨 Latest commit 6252215
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/663a78c6755fa30008445502

@markostanimirovic markostanimirovic changed the title refactor(store): merge Action and TypedAction intefaces feat(store): merge Action and TypedAction intefaces May 7, 2024
@brandonroberts
Copy link
Member

I like this change. I also think its going to be a big breaking change for people who have reached into our src/models directory for that interface that will no longer be there. We've always declared that those are not public API and could be broken without warning, but just something we may want to note in the migration guide specifically.

@brandonroberts brandonroberts merged commit c8bde71 into main May 7, 2024
5 checks passed
@brandonroberts brandonroberts deleted the merge-typed-action-and-action branch May 7, 2024 23:15
@trevorade
Copy link

I like this change. I also think its going to be a big breaking change for people who have reached into our src/models directory for that interface that will no longer be there. We've always declared that those are not public API and could be broken without warning, but just something we may want to note in the migration guide specifically.

Could NgRx be structured in such a way such that only the index.ts files are accessible to remove the possibility of reaching into the implementation files?

@brandonroberts
Copy link
Member

I like this change. I also think its going to be a big breaking change for people who have reached into our src/models directory for that interface that will no longer be there. We've always declared that those are not public API and could be broken without warning, but just something we may want to note in the migration guide specifically.

Could NgRx be structured in such a way such that only the index.ts files are accessible to remove the possibility of reaching into the implementation files?

We're already structured that way. We only expose code through the public API, but the types are included as deep imports. This is how the Angular library build process works with ng-packagr and not something custom we've set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can TypedAction be exported from @ngrx/store?
4 participants