-
Notifications
You must be signed in to change notification settings - Fork 110
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
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
@@ -33,16 +33,16 @@ export class LocalStateAdvancedComponent implements OnInit, OnDestroy { | |||
this.subscription.unsubscribe(); | |||
} | |||
|
|||
handleFormAction(action: Actions<any>) { | |||
handleFormAction(action: NgrxFormActionTypes) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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>) { |
There was a problem hiding this comment.
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]); |
There was a problem hiding this comment.
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]); |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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]); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite right. todo
No description provided.