Skip to content

Commit fc4f76a

Browse files
committed
Fix axios error
1 parent 95a24c5 commit fc4f76a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
"strict": true,
1111
"esModuleInterop": true,
1212
"skipLibCheck": true,
13-
"forceConsistentCasingInFileNames": true
13+
"forceConsistentCasingInFileNames": true,
14+
"paths": {
15+
// axios contains both an index.d.ts and index.d.cts which apparently have
16+
// conflicting types. For some reason TypeScript is reading both and
17+
// throwing errors about AxiosInstance not being compatible with
18+
// AxiosInstance. This ensures we use only index.d.ts.
19+
"axios": ["./node_modules/axios/index.d.ts"]
20+
}
1421
},
1522
"exclude": ["node_modules"],
1623
"include": ["src/**/*"]

0 commit comments

Comments
 (0)