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

Export MemoizedSelectorWithProps and SelectorWithProps from store #1341

Merged
merged 2 commits into from
Sep 25, 2018

Conversation

matepapp
Copy link
Contributor

@matepapp matepapp commented Sep 24, 2018

The main purpose is to be able to import MemoizedSelectorWithProps and SelectorWithProps directly from ngrx/store module. It helps to define explicit type annotations for selectors with props.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

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

Issue Number: N/A

What is the new behavior?

While exporting MemoizedSelectorWithProps and SelectorWithProps from store index.ts file makes it possible to import for type annotations directly from store module instead of ngrx/store/src/selector and ngrx/store/src/models.

Does this PR introduce a breaking change?

[x] Yes
[ ] No

Before

import { createFeatureSelector, createSelector, MemoizedSelector } from '@ngrx/store';
import { MemoizedSelectorWithProps } from '@ngrx/store/src/selector';
import { SelectorWithProps } from '@ngrx/store/src/models';

After

import { createFeatureSelector, createSelector, SelectorWithProps, MemoizedSelector, MemoizedSelectorWithProps } from '@ngrx/store';

Other information

@coveralls
Copy link

coveralls commented Sep 24, 2018

Coverage Status

Coverage increased (+0.006%) to 88.391% when pulling 41f20f4 on team-supercharge:master into d2992c9 on ngrx:master.

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

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

👍 Could you also export SelectorWithProps from models please.

BREAKING CHANGES:

Import MemoizedSelectorWithProps from ngrx/store

BEFORE:

import { createFeatureSelector, createSelector, MemoizedSelector } from '@ngrx/store';
import { MemoizedSelectorWithProps } from '@ngrx/store/src/selector';

AFTER:

import { createFeatureSelector, createSelector, MemoizedSelector, MemoizedSelectorWithProps } from '@ngrx/store';
BREAKING CHANGES:

Import SelectorWithProps from ngrx/store

BEFORE:

import { createFeatureSelector, createSelector } from '@ngrx/store';
import { SelectorWithProps } from '@ngrx/store/src/models';

AFTER:

import { createFeatureSelector, createSelector, SelectorWithProps } from '@ngrx/store';
@matepapp matepapp changed the title Export MemoizedSelectorWithProps from store Export MemoizedSelectorWithProps and SelectorWithProps from store Sep 24, 2018
@matepapp
Copy link
Contributor Author

@timdeschryver I've updated the PR with SelectorWithProps export.

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @matepapp !

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.

None yet

3 participants