I have an axios POST like this:
axios
.post(url, payload)
.then((res) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { someObject } = res.data;
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { someString } = res.data;
...
Currently I have to disable the eslint for those lines. How can I avoid this?
I did try creating interfaces and getting res
and res.data
as AxiosResponse
, but no luck