2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-27 14:47:43 +03:00

upadating README: notes on CommonJS autocomplete (#2256)

closes #2226. add note on how to gain typings / autocomplete / intellisense when using CommonJS (`require()`) imports
This commit is contained in:
Vamp
2019-09-13 12:28:14 +00:00
committed by Felipe Martins
parent 488a4598a3
commit e3a7116f14
+9
View File
@@ -57,6 +57,15 @@ Using cdn:
## Example
### note: CommonJS usage
In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach:
```js
const axios = require('axios').default;
// axios.<method> will now provide autocomplete and parameter typings
```
Performing a `GET` request
```js