-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Prefer import * as
for imports whose types are re-exported
#7742
Prefer import * as
for imports whose types are re-exported
#7742
Conversation
@devrelm: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
Well this clearly isn't working. There's now a bunch of errors that I didn't expect to come up. I'll see what I can do, but this seems like a bit of a catch-22 situation. |
78588fd
to
82ca81b
Compare
I think I have everything working and it was simpler than I'd thought. The errors that I ran into with f3fe053 seem to have stemmed from It appears that that's a known issue, and that the apollographql org even publishes a |
82ca81b
to
62ad4c5
Compare
62ad4c5
to
4efaa9f
Compare
@benjamn Done. Thanks! |
Fixes apollographql#7741 Using `import React from 'react'` causes issues when the import makes its way into the d.ts file. Users without `esModuleInterop: true` or `allowSyntheticDefaultImports: true` (or `skipLibCheck: true`) in their tsconfig files will get errors from typescript about not being able to default-import using that syntax. This PR fixes the specific imports that would cause issues due to their types being re-exported in `@apollo/client`'s types.
4efaa9f
to
2709331
Compare
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.
Thanks for your patience @devrelm (and thanks in advance for testing these changes in the next v3.4 beta release 😉)!
Fixes #7741
Using
import React from 'react'
causes issues when the import makesits way into the d.ts file. Users without
esModuleInterop: true
orallowSyntheticDefaultImports: true
(orskipLibCheck: true
) intheir tsconfig files will get errors from typescript about not being
able to default-import using that syntax.
This PR fixes the specific imports that would cause issues due to
their types being re-exported in
@apollo/client
's types.Checklist:
If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)Make sure all of the significant new logic is covered by tests