From 5974fefc461311a0d66b5aa87fe89f05c9a5e03c Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Tue, 30 Mar 2021 23:02:12 +0300 Subject: [PATCH] ts: Switch extension values to unknown to match Flow types (#3006) --- src/type/definition.d.ts | 18 +++++++++--------- src/type/directives.d.ts | 2 +- src/type/schema.d.ts | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/type/definition.d.ts b/src/type/definition.d.ts index 122f1efec3..50ee968b03 100644 --- a/src/type/definition.d.ts +++ b/src/type/definition.d.ts @@ -281,7 +281,7 @@ export type ThunkObjMap = ObjMap | (() => ObjMap); * an object which can contain all the values you need. */ export interface GraphQLScalarTypeExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } /** @@ -367,7 +367,7 @@ export interface GraphQLScalarTypeConfig { * you may find them useful. */ export interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> { - [attributeName: string]: any; + [attributeName: string]: unknown; } /** @@ -502,7 +502,7 @@ export interface GraphQLFieldExtensions< _TContext, _TArgs = { [argName: string]: any } > { - [attributeName: string]: any; + [attributeName: string]: unknown; } export interface GraphQLFieldConfig< @@ -534,7 +534,7 @@ export type GraphQLFieldConfigArgumentMap = ObjMap; * an object which can contain all the values you need. */ export interface GraphQLArgumentExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } export interface GraphQLArgumentConfig { @@ -592,7 +592,7 @@ export type GraphQLFieldMap = ObjMap< * an object which can contain all the values you need. */ export interface GraphQLInterfaceTypeExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } /** @@ -664,7 +664,7 @@ export interface GraphQLInterfaceTypeConfig { * an object which can contain all the values you need. */ export interface GraphQLUnionTypeExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } /** @@ -738,7 +738,7 @@ export interface GraphQLUnionTypeConfig { * an object which can contain all the values you need. */ export interface GraphQLEnumTypeExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } /** @@ -811,7 +811,7 @@ export type GraphQLEnumValueConfigMap = ObjMap; * an object which can contain all the values you need. */ export interface GraphQLEnumValueExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } export interface GraphQLEnumValueConfig { @@ -841,7 +841,7 @@ export interface GraphQLEnumValue { * an object which can contain all the values you need. */ export interface GraphQLInputObjectTypeExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } /** diff --git a/src/type/directives.d.ts b/src/type/directives.d.ts index 24fa2d6212..66415d879a 100644 --- a/src/type/directives.d.ts +++ b/src/type/directives.d.ts @@ -24,7 +24,7 @@ export function assertDirective(directive: unknown): GraphQLDirective; * an object which can contain all the values you need. */ export interface GraphQLDirectiveExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } /** diff --git a/src/type/schema.d.ts b/src/type/schema.d.ts index e96f2da404..e0d7441dba 100644 --- a/src/type/schema.d.ts +++ b/src/type/schema.d.ts @@ -30,7 +30,7 @@ export function assertSchema(schema: unknown): GraphQLSchema; * an object which can contain all the values you need. */ export interface GraphQLSchemaExtensions { - [attributeName: string]: any; + [attributeName: string]: unknown; } /**