Skip to content
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

TypeScript: Backport v15 .d.ts fixes to v14 #2140

Merged
merged 2 commits into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion tstypes/execution/execute.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion tstypes/subscription/mapAsyncIterator.d.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -6,4 +8,4 @@ export default function mapAsyncIterator<T, U>(
iterable: AsyncIterable<T>,
callback: (arg: T) => PromiseOrValue<U>,
rejectCallback?: (arg: any) => PromiseOrValue<U>,
): AsyncGenerator<U, void, void>;
): any; // TS_SPECIFIC: es2018.asyncgenerator requires typescript@3.6
2 changes: 1 addition & 1 deletion tstypes/utilities/coerceInputValue.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GraphQLInputType } from '../type/definition';
import { GraphQLError } from '../error';
import { GraphQLError } from '../error/GraphQLError';

type OnErrorCB = (
path: ReadonlyArray<string | number>,
Expand Down
2 changes: 1 addition & 1 deletion tstypes/validation/ValidationContext.d.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tstypes/validation/rules/PossibleTypeExtensions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SDLValidationContext } from '../ValidationContext';

export function extendingUnknownTypeMessage(
typeName: string,
suggestedTypes: $ReadOnlyArray<string>,
suggestedTypes: ReadonlyArray<string>,
): string;

export function extendingDifferentTypeKindMessage(
Expand Down
2 changes: 1 addition & 1 deletion tstypes/validation/rules/UniqueDirectiveNames.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ASTVisitor } from '../../language/visitor';
import { ASTValidationContext } from '../ValidationContext';
import { SDLValidationContext } from '../ValidationContext';

export function duplicateDirectiveNameMessage(directiveName: string): string;

Expand Down
2 changes: 1 addition & 1 deletion tstypes/validation/validate.d.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down