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): expose ActionContext and ActionStatus #1766

Merged
merged 1 commit into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
$ npm install @ngxs/store@dev
```

- Feature: Expose `ActionContext` and `ActionStatus` [#1766](https://github.com/ngxs/store/pull/1766)
- Fix: Do not re-use the global `Store` instance between different apps [#1740](https://github.com/ngxs/store/pull/1740)
- Fix: Do not run `Promise.then` within synchronous tests when decorating factory [#1753](https://github.com/ngxs/store/pull/1753)
- Fix: Devtools Plugin - Do not connect to devtools when the plugin is disabled [#1761](https://github.com/ngxs/store/pull/1761)
Expand Down
4 changes: 1 addition & 3 deletions packages/store/src/actions-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ export class InternalActions extends OrderedSubject<ActionContext> {}
* You can listen to this in services to react without stores.
*/
@Injectable()
export class Actions extends Observable<any> {
// This has to be `Observable<ActionContext>` in the v4. Because `InternalActions`
// is a `Subject<ActionContext>`. Leave it as `any` to avoid breaking changes
export class Actions extends Observable<ActionContext> {
constructor(
internalActions$: InternalActions,
internalExecutionStrategy: InternalNgxsExecutionStrategy
Expand Down
2 changes: 1 addition & 1 deletion packages/store/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export { Store } from './store';
export { State } from './decorators/state';
export { Select } from './decorators/select/select';
export { SelectorOptions } from './decorators/selector-options';
export { Actions } from './actions-stream';
export { Actions, ActionContext, ActionStatus } from './actions-stream';

// TODO: v4 - We need to come up with an alternative api to exposing this metadata
// because it is currently used by the following (after a github search):
Expand Down