mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #12946 from Kovensky/patch-3
Axios: give an index type to response headers
This commit is contained in:
@@ -80,7 +80,11 @@ var axiosInstance = axios.create({
|
||||
timeout: 1000
|
||||
});
|
||||
|
||||
axiosInstance.request({url: "issues/1"});
|
||||
axiosInstance.request({url: "issues/1"}).then(res => {
|
||||
if (res.headers['content-type'].startsWith('application/json')) {
|
||||
throw new Error('Unexpected content-type');
|
||||
}
|
||||
});
|
||||
|
||||
axios.all<Repository, Repository>([getRepoDetails, getRepoDetails]).then(([repo1, repo2]) => {
|
||||
var sumIds = repo1.data.id + repo2.data.id;
|
||||
|
||||
Vendored
+1
-1
@@ -159,7 +159,7 @@ declare namespace Axios {
|
||||
/**
|
||||
* headers that the server responded with
|
||||
*/
|
||||
headers: Object;
|
||||
headers: {[index: string]: any};
|
||||
|
||||
/**
|
||||
* config that was provided to `axios` for the request
|
||||
|
||||
Reference in New Issue
Block a user