Encountered a similar error while working with ReactJS stateless function and using the useState hook to set the state of an object array.
const [items , setItems] = useState([]);
The issue arose when trying to update the state in this manner:
const item = { id : new Date().getTime() , text : 'New Text' };
setItems([ item , ...items ]);
This resulted in the following error:
Argument of type '{ id: number; text: any }' is not assignable to parameter of type 'never'
However, by initializing the state like this:
const [items , setItems] = useState([{}]);
The error disappeared, but there was an empty item at the 0 index, which was undesirable.
To resolve this issue, I discovered the solution:
const [items , setItems] = useState([] as any);