1+ /* tslint:disable:ban-types */
12/*!
23 * @imqueue /type-graphql-dependency - Declarative GraphQL dependency loading
34 *
@@ -40,7 +41,7 @@ export interface DependentTypeRelations {
4041 filter : { [ foreignField : string ] : /*localField: */ string } ;
4142}
4243
43- export type DependentType = ( ... args : any [ ] ) => { } | ( ( ... args : any [ ] ) => { } ) [ ] ;
44+ export type DependentType = Function | Function [ ] ;
4445
4546export interface DependsOptions < T > {
4647 require ?: [ ( ) => DependentType , DependentTypeRelations [ ] ] [ ] ;
@@ -49,7 +50,7 @@ export interface DependsOptions<T> {
4950}
5051
5152export interface DependencyInterface < T > {
52- ( type : ( ... args : any [ ] ) => { } ) : GraphQLDependency < T > ;
53+ ( type : Function ) : GraphQLDependency < T > ;
5354 schema ?: GraphQLSchema ;
5455}
5556
@@ -72,7 +73,7 @@ export interface DependencyInterface<T> {
7273 * @constructor
7374 */
7475export const Dependency : DependencyInterface < any > = (
75- type : ( ... args : any [ ] ) => { } ,
76+ type : Function ,
7677) : GraphQLDependency < any > => {
7778 const { schema } = Dependency ;
7879
@@ -81,6 +82,7 @@ export const Dependency: DependencyInterface<any> = (
8182 'nor any dependencies defied!' ) ;
8283 }
8384
85+ // noinspection TypeScriptRedundantGenericType
8486 const targetType = schema . getType ( type . name ) as GraphQLObjectType < any , any > ;
8587
8688 if ( ! targetType || ! targetType . getFields ) {
0 commit comments