-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I'm trying to type an action with something like:
const incrementBy = createAction<number>('INCREMENT_BY');
// TS complains as expected if I pass the wrong type
incrementBy('This is not a valid payload');
// However, TS likes both of these:
incrementBy(3);
incrementBy();
Why is the last one not an error? How can I type it in a way that payload is required?
Metadata
Metadata
Assignees
Labels
No labels