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

Schematics: Missing type for Union #1774

Closed
mikezks opened this issue Apr 19, 2019 · 4 comments
Closed

Schematics: Missing type for Union #1774

mikezks opened this issue Apr 19, 2019 · 4 comments

Comments

@mikezks
Copy link
Contributor

mikezks commented Apr 19, 2019

Minimal reproduction of the bug/regression with instructions:

Using ng g @ngrx/schematics:feature +state/app --group -c to generate a feature state with new createAction() results in following code:

export Union = typeof all;

Expected behavior:

Should be:

export type Union = typeof all;

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):

"@ngrx/schematics": "8.0.0-beta.0"

Other information:

I would be willing to submit a PR to fix this issue

[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No

@timdeschryver
Copy link
Member

Before picking this up, do we want to use union to export the actions or are we simply going to export the action creators?

@mikezks
Copy link
Contributor Author

mikezks commented Apr 20, 2019

Good point, the new createReducer() does not need to have the action union type definition.

Maybe it would avoid possible errors to use the union type in the reducer function as well.

See #1746 discussion about the state type.

@brandonroberts
Copy link
Member

brandonroberts commented Apr 23, 2019

This adds reducer schematics with createReducer and doesn't include any unions as we don't explicitly need them. #1785

@timdeschryver
Copy link
Member

This is resolved via #1785.

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

No branches or pull requests

3 participants