Check out example codes for "Argument of type '{ query: string; }' is not assignable to parameter of type 'AxiosRequestConfig'.". It will help you in understanding the concepts better.

Code Example 1

// create a file named axios.d.ts and put underneath code.
declare module 'axios'

Learn ReactJs, React Native from akashmittal.com