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

Upgrading ngrx/store to utilize new creator functions #228

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

marfehr
Copy link

@marfehr marfehr commented Jan 27, 2021

No description provided.

@codecov
Copy link

codecov bot commented Jan 27, 2021

Codecov Report

Merging #228 (7afc0bb) into develop (52ef184) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #228      +/-   ##
===========================================
- Coverage   100.00%   99.91%   -0.09%     
===========================================
  Files          128      128              
  Lines         2342     2266      -76     
  Branches       432      432              
===========================================
- Hits          2342     2264      -78     
- Misses           0        2       +2     
Impacted Files Coverage Δ
src/control/reducer.ts 100.00% <ø> (ø)
src/actions.ts 100.00% <100.00%> (ø)
src/array/reducer.ts 100.00% <100.00%> (ø)
src/array/reducer/add-control.ts 100.00% <100.00%> (ø)
src/array/reducer/clear-async-error.ts 100.00% <100.00%> (ø)
src/array/reducer/disable.ts 100.00% <100.00%> (ø)
src/array/reducer/enable.ts 100.00% <100.00%> (ø)
src/array/reducer/mark-as-dirty.ts 100.00% <100.00%> (ø)
src/array/reducer/mark-as-pristine.ts 100.00% <100.00%> (ø)
src/array/reducer/mark-as-submitted.ts 100.00% <100.00%> (ø)
... and 79 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52ef184...7afc0bb. Read the comment docs.

@@ -33,16 +33,16 @@ export class LocalStateAdvancedComponent implements OnInit, OnDestroy {
this.subscription.unsubscribe();
}

handleFormAction(action: Actions<any>) {
handleFormAction(action: NgrxFormActionTypes) {
Copy link
Author

Choose a reason for hiding this comment

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

TODO

// update from loaded data
if (a.type === SetManufacturersAction.TYPE) {
return (a as SetManufacturersAction).manufacturers;
if (a.type === SetManufacturersAction.type) {
Copy link
Author

Choose a reason for hiding this comment

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

TODO

@@ -11,7 +11,7 @@ import { INITIAL_FORM_STATE, reducer } from './local-state-introduction.reducer'
export class LocalStateIntroductionComponent {
formState = INITIAL_FORM_STATE;

handleFormAction(action: Actions<any>) {
Copy link
Author

Choose a reason for hiding this comment

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

TODO

expect(a2.type).toBe(MarkAsDirtyAction.type);
expect(a3.type).toBe(SetValueAction.type);
expect(a4.type).toBe(MarkAsDirtyAction.type);
// expect((a1 as SetValueAction<string>).value).toBe(RADIO_OPTIONS[0]);
Copy link
Author

Choose a reason for hiding this comment

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

TODO

expect(a.type).toBe(SetValueAction.TYPE);
expect((a as SetValueAction<string>).value).toBe(RADIO_OPTIONS[0]);
expect(a.type).toBe(SetValueAction.type);
// expect((a as SetValueAction<string>).value).toBe(RADIO_OPTIONS[0]);
Copy link
Author

Choose a reason for hiding this comment

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

TODO

expect(a.type).toBe(SetValueAction.TYPE);
expect((a as SetValueAction<Boxed<string[]>>).value).toEqual(box(SELECT_OPTIONS));
expect(a.type).toBe(SetValueAction.type);
// expect((a as SetValueAction<Boxed<string[]>>).value).toEqual(box(SELECT_OPTIONS));
Copy link
Author

Choose a reason for hiding this comment

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

TODO

expect(a.type).toBe(SetValueAction.TYPE);
expect((a as SetValueAction<number>).value).toBe(SELECT_NUMBER_OPTIONS[0]);
expect(a.type).toBe(SetValueAction.type);
// expect((a as SetValueAction<number>).value).toBe(SELECT_NUMBER_OPTIONS[0]);
Copy link
Author

Choose a reason for hiding this comment

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

TODO

@@ -21,7 +21,7 @@ import { Document, NgrxFormControlDirective, NgrxFormControlValueType } from './
export class NgrxLocalFormControlDirective<TStateValue, TViewValue = TStateValue>
extends NgrxFormControlDirective<TStateValue, TViewValue> {

@Output() ngrxFormsAction = new EventEmitter<Actions<NgrxFormControlValueType<TStateValue>>>();
@Output() ngrxFormsAction = new EventEmitter<any>(); // type fix me
Copy link
Author

Choose a reason for hiding this comment

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

TODO

@@ -9,13 +9,13 @@ import { NgrxFormDirective } from './directive';
})
export class NgrxLocalFormDirective<TStateValue> extends NgrxFormDirective<TStateValue> {

@Output() ngrxFormsAction = new EventEmitter<Actions<TStateValue>>();
@Output() ngrxFormsAction = new EventEmitter<any>(); // type fix me
Copy link
Author

Choose a reason for hiding this comment

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

TODO

ResetActionType = 'ngrx/forms/RESET'
}

// using the creator fnc doesnt break api and we can use generic types
Copy link
Author

Choose a reason for hiding this comment

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

Not quite right. todo

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.

1 participant