Conversation
`axios.headers` is not of the same type as `request.headers`, so a new type `AxiosDefaults` was introduced
This asserts that the type definitions are valid in the specified TypeScript version and above. This is the same tool that is used by DefinitelyTyped.
|
@remcohaszing can you please have a look at the merge conflict, please ping me when resolved. |
|
@jasonsaayman resolved! |
index.d.ts
Outdated
| @@ -1,3 +1,19 @@ | |||
| // TypeScript Version: 3.0 | |||
|
|
|||
| export interface HeadersDefaults { | |||
There was a problem hiding this comment.
Any particular reason to add this interface here at the beginning, rather than towards the end?
There was a problem hiding this comment.
Nope. I didn’t really think about placement.
|
@jasonsaayman I’d like to point out #4066, #4136, and #4147 also look good. They don't conflict with each other, but some will cause conflict conflicts with this PR. If they all get merged, I can resolve the merge conflicts in here. |
|
Ok cool @remcohaszing I will look into all of that |
|
Seems that NPM had some downtime while I was trying to merge, I will look into this in a couple hours, thanks |
|
Any estimates, when this fix will be available would be very much helpful |
|
@remcohaszing can you mend these large merge conflicts then I can merge and do a release :) |
You were 2 seconds ahead of my push xD |
|
Thanks for this :) merging now |
* Distinguish request and response data types * Fix Axios headers type `axios.headers` is not of the same type as `request.headers`, so a new type `AxiosDefaults` was introduced * Replace grunt-ts with dtslint This asserts that the type definitions are valid in the specified TypeScript version and above. This is the same tool that is used by DefinitelyTyped. * Remove grunt-ts * Restore typescript dependency * Fix missing semicolons Co-authored-by: Claas Augner <[email protected]> Co-authored-by: Jay <[email protected]>
This asserts the type definitions work as expected for TypeScript 3.0 and above. This is the initial setup. I want to keep this minimal and add proper type assertions and some type fixes later. This is why the referenced issue isn’t closed yet.
This also fixes the axios defaults headers type.
I believe it’s a good idea to get this merged fast, so other TypeScript related issues and pull requests can be resolved more confidently.
Refs #4134
Closes #4108
Closes #4117
Closes #4132
Closes #4153
Closes #4157