This repository was archived by the owner on Feb 3, 2020. It is now read-only.
This repository was archived by the owner on Feb 3, 2020. It is now read-only.
using createAction without type parameters is unsafe #28
Open
Description
currently:
// 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.
Metadata
Metadata
Assignees
Labels
No labels