From 99c0c87995a3b7e970c53c0ccfcd32ef9390cadf Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Tue, 16 Feb 2021 16:35:58 +0200 Subject: [PATCH] TS: Enable integrations tests for extending `GraphQL*Extensions` types --- integrationTests/ts/index.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/integrationTests/ts/index.ts b/integrationTests/ts/index.ts index 6ef6bea899..23402f543a 100644 --- a/integrationTests/ts/index.ts +++ b/integrationTests/ts/index.ts @@ -13,17 +13,14 @@ const example: SomeExtension = { string: 'Meaning of life', }; -// FIXME: The following code block requires a version of TypeScript >= 3.2 -/* - declare module 'graphql' { - interface GraphQLObjectTypeExtensions { + interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> { someObjectExtension?: SomeExtension; } interface GraphQLFieldExtensions< - TSource, - TContext, - TArgs = { [argName: string]: any } + _TSource, + _TContext, + _TArgs = { [argName: string]: any } > { someFieldExtension?: SomeExtension; } @@ -31,7 +28,6 @@ declare module 'graphql' { someArgumentExtension?: SomeExtension; } } -*/ const queryType: GraphQLObjectType = new GraphQLObjectType({ name: 'Query',