mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
9588fcdec8
TypeScript 4.7 introduced the `node16` module option. This requires CommonJS libraries like axios to be properly typed as CommonJS. The proper type for `module.export =` in JavaScript, is to use `exports =` in TypeScript. In order to export additional types, a namespace can be used. However, no values can be exported like this. Values are exported using the `AxiosStatic` interface. This change should be non-breaking. If TypeScript users previously relied on the faux default export, they now need to enable `esModuleInterop`, as they should have been doing in the first place. Co-authored-by: Jay <jasonsaayman@gmail.com>