Axios: Using this lib in typescript : how to include axios and others like AxiosRequestConfig ?

Created on 1 Sep 2016  路  3Comments  路  Source: axios/axios

Currently I'm using this:

import axios from 'axios';
import { AxiosRequestConfig, AxiosPromise } from 'axios';

Which seems a bit strange, is there a better way ?

Most helpful comment

You can use this instead:

import axios, { AxiosRequestConfig, AxiosPromise } from 'axios';

All 3 comments

You can use this instead:

import axios, { AxiosRequestConfig, AxiosPromise } from 'axios';

Thanks for the answer.

this took me forever to figure out...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

helmus picture helmus  路  3Comments

ghost picture ghost  路  3Comments

Spartano picture Spartano  路  3Comments

emaincourt picture emaincourt  路  3Comments

samayo picture samayo  路  3Comments