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

fix(store): correctly infer action group events defined as empty object #3833

Conversation

markostanimirovic
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] 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 action group type won't be correctly inferred when events are defined as an empty object:

const fooActions = createActionGroup({
  source: 'Foo',
  events: {},
});

// there is no compilation error
fooActions.x();
fooActions.y();

What is the new behavior?

The action group type will be correctly inferred when events are defined as an empty object, so in the example above, the compilation error will be thrown.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@netlify
Copy link

netlify bot commented Apr 5, 2023

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit ab6b5bf
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/6432c7569812c50008422400

@markostanimirovic markostanimirovic force-pushed the fix/store/createActionGroup-empty-events branch from f65fba0 to 4288d7f Compare April 7, 2023 14:18
@brandonroberts brandonroberts merged commit dc78447 into ngrx:master Apr 15, 2023
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.

3 participants