Reputation: 832
I am getting the error Type '{}' does not satisfy the constraint '"action creator props cannot be an empty object"'.
export const myActions = createActionGroup({
source: 'My Section',
events: {
someAction1: props<{isEnabled: boolean}>(),
someAction2: props<{}>(), // causes error
},
});
How do I create an action without properties?
Upvotes: 0
Views: 14
Reputation: 832
emptyProps()
https://ngrx.io/api/store/emptyProps
Apparently my answer must be longer :P
Upvotes: 0