-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Exposing the Axios constructor in index.d.ts #2872
Exposing the Axios constructor in index.d.ts #2872
Conversation
Could you please take a look? After I used the “Update branch” button on April, 8th Travis is green instead of a stuck yellow as well. |
@chinesedfan Is there something which still needs to be done for this MR? |
Would it be possible to get this merged soon, please? |
Will look at this as soon as I can |
11d3801
to
ab71639
Compare
ab71639
to
5cb4987
Compare
@remcohaszing Can you return the favor and review this one, please? The reason behind this change is being able to It should be non-breaking, but a second pair of eyes would be helpful. |
I looked into it. This allow to use the following statements that were previously not possible: import axios from 'Axios';
const foo = new axios.Axios(); // Use Axios constructor
foo instanceof axios.Axios; // Instanceof check for Axios instance
foo('/'); // This is unsupported, and now also an error in TypeScript The All of these cases are properly handled by the new type definitions, and it’s non-breaking. LGTM 😃 |
5cb4987
to
423f1ab
Compare
@jasonsaayman I'd appreciate if you could take a look at this one. I'm happy to answer all your questions about it, like we did in #2797 👍 |
423f1ab
to
c367d83
Compare
c367d83
to
36b6114
Compare
@jasonsaayman Friendly ping. I just rebased this PR once again and it's already been reviewed by Remco. |
36b6114
to
cef5420
Compare
cef5420
to
61db8ad
Compare
This patch allows TypeScript users to extend the `Axios` class without the type checker complaining. see 7548f2f
61db8ad
to
c72c87a
Compare
@jasonsaayman Any chance? I just rebased the PR onto the latest |
@TimWolla thanks for being so tenacious, I am merging this now 🥳 |
Thanks! 🚀 |
This patch allows TypeScript users to extend the `Axios` class without the type checker complaining. see 7548f2f Co-authored-by: Jay <jasonsaayman@gmail.com>
This patch allows TypeScript users to extend the
Axios
class withoutthe type checker complaining.
see 7548f2f
Fixes #3017