This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 347
apollo-link-http-common references type GlobalFetch, to be removed in Typescript 3.6 #1094
Comments
sandersn
added a commit
to sandersn/apollo-link
that referenced
this issue
Jun 19, 2019
Fixes compilation of apollo-link-http-common in the upcoming Typescript 3.6. Fixes apollographql#1094
benjamn
pushed a commit
that referenced
this issue
Jun 20, 2019
Fixes compilation of apollo-link-http-common in the upcoming Typescript 3.6. Fixes #1094
@sandersn @benjamn when installing apollo-boost on a node server, we still get this issue. The problem seems to be on the declaration file
maybe apollo-boost needs to be updated too? |
@eturino new PR about this: apollographql/apollo-client#5367 |
I added to my src/shims-tsx.d.ts this to get rid of this warning
|
bkegley
added a commit
to bkegley/apollo-client
that referenced
this issue
Oct 29, 2019
Per this resolved [issue](apollographql/apollo-link#1094), apollo-boost should also remove reference to `GlobalFetch`.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected Behavior
No error when compiling Definitely Typed types for apollo-upload-client:
Actual Behavior
Error in apollo-link-http-common's types, which refer to
GlobalFetch
. GlobalFetch will be removed in Typescript 3.6 in favour of WindowOrWebWorker, which has the samefetch
method:A simple reproduction
npm install -g typescript@next cd packages/apollo-link-http-common/src tsc
Gives the errors:
(This is not the right way to build this file, so there are 4 other errors. You will only see those 4 if you use
typescript@latest
)The fix is to replace
GlobalFetch
withWindowOrWorkerGlobalScope
. I'll put up a PR that does this shortly.The text was updated successfully, but these errors were encountered: