2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00
Files
axios/test
Remco Haszing 9588fcdec8 Fix TypeScript exports (#4884)
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>
2022-09-28 20:30:21 +02:00
..
2022-09-28 20:30:21 +02:00