New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test types #4140
Test types #4140
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, no need to credit me for that missing semicolon
PS: Oops, too late, that PR is already merged.
index.d.ts
Outdated
@@ -1,3 +1,19 @@ | |||
// TypeScript Version: 3.0 | |||
|
|||
export interface HeadersDefaults { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason to add this interface here at the beginning, rather than towards the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <github@caugner.de> Co-authored-by: Jay <jasonsaayman@gmail.com>
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