// action payload type is '{}' which is almost as bad as any
const anyAction = createAction('increment');
I think it would be safer to default to void or somehow force user to specifying type parameter and be explicit about using any:
const voidAction = createAction('increment'); // same as using <void>
// or
const illegalAction = createAction('increment'); //compile error
// still possible but explicit
const anyAction = createAction<any>('increment');
Tested with typescript 3.4.5 and all strict rules enabled.
currently:
I think it would be safer to default to
void
or somehow force user to specifying type parameter and be explicit about usingany
:Tested with typescript 3.4.5 and all strict rules enabled.