Skip to content
Permalink
Browse files

Expose global `fetch` and `URL` types to avoid relying on `dom` lib

  • Loading branch information...
martijnwalraven committed Oct 11, 2018
1 parent d0590ac commit 304074f3368c87fe2b40d1c954036c647600015e
@@ -0,0 +1,17 @@
type fetch = typeof import('./fetch').fetch;
type RequestInfo = import('./fetch').RequestInfo;
type Headers = import('./fetch').Headers;
type HeadersInit = import('./fetch').HeadersInit;
type Body = import('./fetch').Body;
type Request = import('./fetch').Request;
type RequestInit = import('./fetch').RequestInit;
type RequestMode = import('./fetch').RequestMode;
type RequestCredentials = import('./fetch').RequestCredentials;
type RequestCache = import('./fetch').RequestCache;
type RequestRedirect = import('./fetch').RequestRedirect;
type ReferrerPolicy = import('./fetch').ReferrerPolicy;
type Response = import('./fetch').Response;
type ResponseInit = import('./fetch').ResponseInit;
type BodyInit = import('./fetch').BodyInit;
type URLSearchParams = import('./url').URLSearchParams;
type URLSearchParamsInit = import('./url').URLSearchParamsInit;
@@ -5,8 +5,8 @@
"outDir": "./dist",
"noImplicitAny": false,
"strictNullChecks": false,
"lib": ["es2017", "esnext.asynciterable", "dom"],
"types": ["node", "jest"]
"lib": ["es2017", "esnext.asynciterable"],
"types": ["node", "jest", "apollo-server-env/dist/global"]
},
"include": ["src/**/*"],
"exclude": ["**/__tests__", "**/__mocks__"],
@@ -2,7 +2,8 @@
"extends": "./tsconfig.base",
"compilerOptions": {
"noEmit": true,
"types": ["node", "jest"],
"lib": ["es2017", "esnext.asynciterable"],
"types": ["node", "jest", "apollo-server-env/dist/global"],
"paths": {
"__mocks__/*" : ["__mocks__/*"],
"*" : ["types/*"]

0 comments on commit 304074f

Please sign in to comment.
You can’t perform that action at this time.