From e396b8d064d37f4fd6ef22b1b89de1fd6ea072aa Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Tue, 25 May 2021 01:04:00 +0300 Subject: [PATCH] TS: Drop template argument from GraphQLFormattedError This change was made back when TS typings was hosted on DefinetlyTyped see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/36205 If such function is requested it should be implemented similar to extensions in `GraphQL*Type` classes. --- src/error/formatError.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/error/formatError.d.ts b/src/error/formatError.d.ts index 8d9013133b..e473694d3b 100644 --- a/src/error/formatError.d.ts +++ b/src/error/formatError.d.ts @@ -8,9 +8,7 @@ export function formatError(error: GraphQLError): GraphQLFormattedError; /** * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors */ -export interface GraphQLFormattedError< - TExtensions extends Record = Record, -> { +export interface GraphQLFormattedError { /** * A short, human-readable summary of the problem that **SHOULD NOT** change * from occurrence to occurrence of the problem, except for purposes of @@ -33,5 +31,5 @@ export interface GraphQLFormattedError< * Reserved for implementors to extend the protocol however they see fit, * and hence there are no additional restrictions on its contents. */ - readonly extensions?: TExtensions; + readonly extensions?: { [key: string]: unknown }; }