[bug: typescript] `ActionCreator` lose it's arguments type
Author: dabusideCreated Jun 21, 2019Updated Mar 18, 2026
LabelsTypeScript
What is the current behavior?
We declare the addTodo function that accepts one string argument text,
but we could pass any argument to it.
const addTodoAction: AddTodoAction = addTodo(false, 0, null);
//no ts error!
There may be a problem (...args: any[])
https://github.com/reduxjs/redux/blob/c676a25525bd7e4f2bf407cf1a135f355a2c1d79/index.d.ts#L440-L442
What is the expected behavior?
Raise a type error
Source: reduxjs/redux