diff --git a/package.json b/package.json index 918eb7bbb2..5b1553ed00 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "private": true, "main": "index", "module": "index.mjs", + "types": "index.d.ts", "sideEffects": false, "homepage": "https://github.com/graphql/graphql-js", "bugs": { diff --git a/tstypes/execution/execute.d.ts b/tstypes/execution/execute.d.ts index ad8dd34e4f..95d2acbe0b 100644 --- a/tstypes/execution/execute.d.ts +++ b/tstypes/execution/execute.d.ts @@ -2,7 +2,9 @@ import Maybe from '../tsutils/Maybe'; import { PromiseOrValue } from '../jsutils/PromiseOrValue'; import { Path, addPath, pathToArray } from '../jsutils/Path'; -import { GraphQLError, locatedError } from '../error'; +import { GraphQLError } from '../error/GraphQLError'; +import { locatedError } from '../error/locatedError'; + import { DirectiveNode, DocumentNode, diff --git a/tstypes/subscription/mapAsyncIterator.d.ts b/tstypes/subscription/mapAsyncIterator.d.ts index cb13dbbd8e..128d844a27 100644 --- a/tstypes/subscription/mapAsyncIterator.d.ts +++ b/tstypes/subscription/mapAsyncIterator.d.ts @@ -1,3 +1,5 @@ +import { PromiseOrValue } from '../jsutils/PromiseOrValue'; + /** * Given an AsyncIterable and a callback function, return an AsyncIterator * which produces values mapped via calling the callback function. @@ -6,4 +8,4 @@ export default function mapAsyncIterator( iterable: AsyncIterable, callback: (arg: T) => PromiseOrValue, rejectCallback?: (arg: any) => PromiseOrValue, -): AsyncGenerator; +): any; // TS_SPECIFIC: es2018.asyncgenerator requires typescript@3.6 diff --git a/tstypes/utilities/coerceInputValue.d.ts b/tstypes/utilities/coerceInputValue.d.ts index fab95bde21..45c70a5d33 100644 --- a/tstypes/utilities/coerceInputValue.d.ts +++ b/tstypes/utilities/coerceInputValue.d.ts @@ -1,5 +1,5 @@ import { GraphQLInputType } from '../type/definition'; -import { GraphQLError } from '../error'; +import { GraphQLError } from '../error/GraphQLError'; type OnErrorCB = ( path: ReadonlyArray, diff --git a/tstypes/validation/ValidationContext.d.ts b/tstypes/validation/ValidationContext.d.ts index b98c947b7f..1a0dcf104a 100644 --- a/tstypes/validation/ValidationContext.d.ts +++ b/tstypes/validation/ValidationContext.d.ts @@ -1,5 +1,5 @@ import Maybe from '../tsutils/Maybe'; -import { GraphQLError } from '../error'; +import { GraphQLError } from '../error/GraphQLError'; import { ASTVisitor } from '../language/visitor'; import { DocumentNode, diff --git a/tstypes/validation/rules/PossibleTypeExtensions.d.ts b/tstypes/validation/rules/PossibleTypeExtensions.d.ts index 0bb4328f19..404784021c 100644 --- a/tstypes/validation/rules/PossibleTypeExtensions.d.ts +++ b/tstypes/validation/rules/PossibleTypeExtensions.d.ts @@ -3,7 +3,7 @@ import { SDLValidationContext } from '../ValidationContext'; export function extendingUnknownTypeMessage( typeName: string, - suggestedTypes: $ReadOnlyArray, + suggestedTypes: ReadonlyArray, ): string; export function extendingDifferentTypeKindMessage( diff --git a/tstypes/validation/rules/UniqueDirectiveNames.d.ts b/tstypes/validation/rules/UniqueDirectiveNames.d.ts index 3490938491..9080be2ed4 100644 --- a/tstypes/validation/rules/UniqueDirectiveNames.d.ts +++ b/tstypes/validation/rules/UniqueDirectiveNames.d.ts @@ -1,5 +1,5 @@ import { ASTVisitor } from '../../language/visitor'; -import { ASTValidationContext } from '../ValidationContext'; +import { SDLValidationContext } from '../ValidationContext'; export function duplicateDirectiveNameMessage(directiveName: string): string; diff --git a/tstypes/validation/validate.d.ts b/tstypes/validation/validate.d.ts index 2341d0af3e..a4baff7f73 100644 --- a/tstypes/validation/validate.d.ts +++ b/tstypes/validation/validate.d.ts @@ -1,4 +1,4 @@ -import { GraphQLError } from '../error'; +import { GraphQLError } from '../error/GraphQLError'; import { DocumentNode } from '../language/ast'; import { GraphQLSchema } from '../type/schema'; import { TypeInfo } from '../utilities/TypeInfo';