mirror of
https://github.com/tenrok/axios.git
synced 2026-05-30 15:24:11 +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>
15 lines
238 B
JSON
15 lines
238 B
JSON
{
|
|
"compilerOptions": {
|
|
"module": "commonjs",
|
|
"lib": ["dom", "es2015"],
|
|
"types": [],
|
|
"moduleResolution": "node",
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"baseUrl": ".",
|
|
"paths": {
|
|
"axios": ["."]
|
|
}
|
|
}
|
|
}
|