@@ -1017,34 +1017,36 @@ export interface GraphQLInterfaceTypeExtensions {
10171017 * });
10181018 * ```
10191019 */
1020- export class GraphQLInterfaceType {
1020+ export class GraphQLInterfaceType < TSource = any , TContext = any > {
10211021 name : string ;
10221022 description : Maybe < string > ;
1023- resolveType : Maybe < GraphQLTypeResolver < any , any > > ;
1023+ resolveType : Maybe < GraphQLTypeResolver < TSource , TContext > > ;
10241024 extensions : Readonly < GraphQLInterfaceTypeExtensions > ;
10251025 astNode : Maybe < InterfaceTypeDefinitionNode > ;
10261026 extensionASTNodes : ReadonlyArray < InterfaceTypeExtensionNode > ;
10271027
1028- private _fields : ThunkObjMap < GraphQLField < any , any > > ;
1028+ private _fields : ThunkObjMap < GraphQLField < TSource , TContext > > ;
10291029 private _interfaces : ThunkReadonlyArray < GraphQLInterfaceType > ;
10301030
1031- constructor ( config : Readonly < GraphQLInterfaceTypeConfig < any , any > > ) {
1031+ constructor ( config : Readonly < GraphQLInterfaceTypeConfig < TSource , TContext > > ) {
10321032 this . name = assertName ( config . name ) ;
10331033 this . description = config . description ;
10341034 this . resolveType = config . resolveType ;
10351035 this . extensions = toObjMap ( config . extensions ) ;
10361036 this . astNode = config . astNode ;
10371037 this . extensionASTNodes = config . extensionASTNodes ?? [ ] ;
10381038
1039- this . _fields = defineFieldMap . bind ( undefined , config . fields ) ;
1039+ // prettier-ignore
1040+ // FIXME: blocked by https://github.com/prettier/prettier/issues/14625
1041+ this . _fields = ( defineFieldMap < TSource , TContext > ) . bind ( undefined , config . fields ) ;
10401042 this . _interfaces = defineInterfaces . bind ( undefined , config . interfaces ) ;
10411043 }
10421044
10431045 get [ Symbol . toStringTag ] ( ) {
10441046 return 'GraphQLInterfaceType' ;
10451047 }
10461048
1047- getFields ( ) : GraphQLFieldMap < any , any > {
1049+ getFields ( ) : GraphQLFieldMap < TSource , TContext > {
10481050 if ( typeof this . _fields === 'function' ) {
10491051 this . _fields = this . _fields ( ) ;
10501052 }
@@ -1058,7 +1060,7 @@ export class GraphQLInterfaceType {
10581060 return this . _interfaces ;
10591061 }
10601062
1061- toConfig ( ) : GraphQLInterfaceTypeNormalizedConfig {
1063+ toConfig ( ) : GraphQLInterfaceTypeNormalizedConfig < TSource , TContext > {
10621064 return {
10631065 name : this . name ,
10641066 description : this . description ,
@@ -1096,10 +1098,10 @@ export interface GraphQLInterfaceTypeConfig<TSource, TContext> {
10961098 extensionASTNodes ?: Maybe < ReadonlyArray < InterfaceTypeExtensionNode > > ;
10971099}
10981100
1099- export interface GraphQLInterfaceTypeNormalizedConfig
1101+ export interface GraphQLInterfaceTypeNormalizedConfig < TSource , TContext >
11001102 extends GraphQLInterfaceTypeConfig < any , any > {
11011103 interfaces : ReadonlyArray < GraphQLInterfaceType > ;
1102- fields : GraphQLFieldConfigMap < any , any > ;
1104+ fields : GraphQLFieldConfigMap < TSource , TContext > ;
11031105 extensions : Readonly < GraphQLInterfaceTypeExtensions > ;
11041106 extensionASTNodes : ReadonlyArray < InterfaceTypeExtensionNode > ;
11051107}
0 commit comments