Skip to content

Commit c3ef0ce

Browse files
committed
fix typescript defs
1 parent cd65f79 commit c3ef0ce

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/fieldsConverter.d.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
EnumTypeComposer,
33
SchemaComposer,
44
ObjectTypeComposer,
5+
ComposeOutputType,
56
} from 'graphql-compose';
67
import { GraphQLScalarType } from 'graphql-compose/lib/graphql';
78
import { Model, Schema } from 'mongoose';
@@ -12,12 +13,6 @@ type MongooseFieldT = any;
1213
type MongooseFieldMapT = { [fieldName: string]: MongooseFieldT };
1314
type ComposeScalarType = string | GraphQLScalarType;
1415

15-
type ComposeOutputType =
16-
| ObjectTypeComposer<any>
17-
| ComposeScalarType
18-
| EnumTypeComposer
19-
| [ObjectTypeComposer<any> | ComposeScalarType | EnumTypeComposer];
20-
2116
export type MongoosePseudoModelT = {
2217
schema: Schema;
2318
};
@@ -56,7 +51,7 @@ export function convertFieldToGraphQL(
5651
field: MongooseFieldT,
5752
prefix: string | undefined,
5853
schemaComposer: SchemaComposer<any>,
59-
): ComposeOutputType;
54+
): ComposeOutputType<any, any>;
6055

6156
export function deriveComplexType(
6257
field: MongooseFieldT,
@@ -68,7 +63,7 @@ export function arrayToGraphQL(
6863
field: MongooseFieldT,
6964
prefix: string | undefined,
7065
schemaComposer: SchemaComposer<any>,
71-
): ComposeOutputType;
66+
): ComposeOutputType<any, any>;
7267

7368
export function embeddedToGraphQL(
7469
field: MongooseFieldT,

0 commit comments

Comments
 (0)