Skip to content

Commit 8409500

Browse files
committed
definitions: remove TS-specific TArgs
Was added in DefinitelyTyped/DefinitelyTyped#32694 Motivation for removal #2481
1 parent fe878ee commit 8409500

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

src/type/definition.d.ts

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ export interface GraphQLScalarTypeConfig<TInternal, TExternal> {
378378
export class GraphQLObjectType<
379379
TSource = any,
380380
TContext = any,
381-
TArgs = { [key: string]: any }
382381
> {
383382
name: string;
384383
description: Maybe<string>;
@@ -388,10 +387,10 @@ export class GraphQLObjectType<
388387
extensionASTNodes: Maybe<ReadonlyArray<ObjectTypeExtensionNode>>;
389388

390389
constructor(
391-
config: Readonly<GraphQLObjectTypeConfig<TSource, TContext, TArgs>>,
390+
config: Readonly<GraphQLObjectTypeConfig<TSource, TContext>>,
392391
);
393392

394-
getFields(): GraphQLFieldMap<any, TContext, TArgs>;
393+
getFields(): GraphQLFieldMap<any, TContext>;
395394
getInterfaces(): Array<GraphQLInterfaceType>;
396395

397396
toConfig(): GraphQLObjectTypeConfig<any, any> & {
@@ -410,34 +409,30 @@ export function argsToArgsConfig(
410409
args: ReadonlyArray<GraphQLArgument>,
411410
): GraphQLFieldConfigArgumentMap;
412411

413-
// TS_SPECIFIC: TArgs
414412
export interface GraphQLObjectTypeConfig<
415413
TSource,
416414
TContext,
417-
TArgs = { [key: string]: any }
418415
> {
419416
name: string;
420417
description?: Maybe<string>;
421418
interfaces?: Thunk<Maybe<Array<GraphQLInterfaceType>>>;
422-
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext, TArgs>>;
419+
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext>>;
423420
isTypeOf?: Maybe<GraphQLIsTypeOfFn<TSource, TContext>>;
424421
extensions?: Maybe<Readonly<Record<string, any>>>;
425422
astNode?: Maybe<ObjectTypeDefinitionNode>;
426423
extensionASTNodes?: Maybe<ReadonlyArray<ObjectTypeExtensionNode>>;
427424
}
428425

429-
// TS_SPECIFIC: TArgs
430426
export type GraphQLTypeResolver<
431427
TSource,
432428
TContext,
433-
TArgs = { [key: string]: any }
434429
> = (
435430
value: TSource,
436431
context: TContext,
437432
info: GraphQLResolveInfo,
438433
abstractType: GraphQLAbstractType,
439434
) => PromiseOrValue<
440-
Maybe<GraphQLObjectType<TSource, TContext, TArgs> | string>
435+
Maybe<GraphQLObjectType<TSource, TContext> | string>
441436
>;
442437

443438
export type GraphQLIsTypeOfFn<TSource, TContext> = (
@@ -497,13 +492,11 @@ export interface GraphQLArgumentConfig {
497492
astNode?: Maybe<InputValueDefinitionNode>;
498493
}
499494

500-
// TS_SPECIFIC: TArgs
501495
export type GraphQLFieldConfigMap<
502496
TSource,
503497
TContext,
504-
TArgs = { [key: string]: any }
505498
> = {
506-
[key: string]: GraphQLFieldConfig<TSource, TContext, TArgs>;
499+
[key: string]: GraphQLFieldConfig<TSource, TContext>;
507500
};
508501

509502
export interface GraphQLField<
@@ -534,13 +527,11 @@ export interface GraphQLArgument {
534527

535528
export function isRequiredArgument(arg: GraphQLArgument): boolean;
536529

537-
// TS_SPECIFIC: TArgs
538530
export type GraphQLFieldMap<
539531
TSource,
540532
TContext,
541-
TArgs = { [key: string]: any }
542533
> = {
543-
[key: string]: GraphQLField<TSource, TContext, TArgs>;
534+
[key: string]: GraphQLField<TSource, TContext>;
544535
};
545536

546537
/**
@@ -585,22 +576,20 @@ export class GraphQLInterfaceType {
585576
inspect(): string;
586577
}
587578

588-
// TS_SPECIFIC: TArgs
589579
export interface GraphQLInterfaceTypeConfig<
590580
TSource,
591581
TContext,
592-
TArgs = { [key: string]: any }
593582
> {
594583
name: string;
595584
description?: Maybe<string>;
596585
interfaces?: Thunk<Maybe<Array<GraphQLInterfaceType>>>;
597-
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext, TArgs>>;
586+
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext>>;
598587
/**
599588
* Optionally provide a custom type resolver function. If one is not provided,
600589
* the default implementation will call `isTypeOf` on each implementing
601590
* Object type.
602591
*/
603-
resolveType?: Maybe<GraphQLTypeResolver<TSource, TContext, TArgs>>;
592+
resolveType?: Maybe<GraphQLTypeResolver<TSource, TContext>>;
604593
extensions?: Maybe<Readonly<Record<string, any>>>;
605594
astNode?: Maybe<InterfaceTypeDefinitionNode>;
606595
extensionASTNodes?: Maybe<ReadonlyArray<InterfaceTypeExtensionNode>>;

0 commit comments

Comments
 (0)