Skip to content

Commit

Permalink
upadating README: notes on CommonJS autocomplete (#2256)
Browse files Browse the repository at this point in the history
closes #2226. add note on how to gain typings / autocomplete / intellisense when using CommonJS (`require()`) imports
  • Loading branch information
the-vampiire authored and felipewmartins committed Sep 13, 2019
1 parent 488a459 commit e3a7116
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -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
Expand Down

0 comments on commit e3a7116

Please sign in to comment.