ctimmerm / axios-mock-adapter

Axios adapter that allows to easily mock requests
MIT License
3.47k stars 245 forks source link

Callbacks with typescript are very confusing #326

Open comod opened 2 years ago

comod commented 2 years ago

Callback looks like this:

type CallbackResponseSpecFunc = (
    config: AxiosRequestConfig
) => unknown[] | Promise<unknown[]>;

It tells nothing about what needs to be inside the array. Only by reading the readme i figured it out how to use.