How to change the typescript type definition of a npm package

< H1 > problem description < / H1 >

I want to make some custom configurations for axios
such as axios.c = {}
, which is no problem in the original js file
but
prompts TS2551: Property "c" does not exist on type "AxiosStatic". after migrating to typescript. Did you mean "Cancel"?

how can this be done?


declare module 'axios' {
 interface AxiosInstance {
    c: any;
 }
}
Menu