@@ -21,7 +21,7 @@ import {
21
21
UnionTypeExtensionNode ,
22
22
} from 'graphql' ;
23
23
import { get , map , sortBy , upperFirst } from 'lodash' ;
24
- import {
24
+ import type {
25
25
ClassDeclarationStructure ,
26
26
EnumDeclarationStructure ,
27
27
InterfaceDeclarationStructure ,
@@ -32,7 +32,6 @@ import {
32
32
PropertyDeclarationStructure ,
33
33
PropertySignatureStructure ,
34
34
SourceFile ,
35
- StructureKind ,
36
35
TypeAliasDeclarationStructure ,
37
36
} from 'ts-morph' ;
38
37
import { DEFINITIONS_FILE_HEADER } from './graphql.constants' ;
@@ -136,7 +135,7 @@ export class GraphQLAstExplorer {
136
135
) ;
137
136
138
137
fileStructure . statements . push ( {
139
- kind : StructureKind . TypeAlias ,
138
+ kind : tsMorphLib . StructureKind . TypeAlias ,
140
139
name : 'Nullable' ,
141
140
isExported : false ,
142
141
type : 'T | null' ,
@@ -444,7 +443,7 @@ export class GraphQLAstExplorer {
444
443
typeof typeMapping === 'string' ? typeMapping : typeMapping ?. name ;
445
444
446
445
return {
447
- kind : StructureKind . TypeAlias ,
446
+ kind : tsMorphLib . StructureKind . TypeAlias ,
448
447
name,
449
448
type : mappedTypeName ?? options . defaultScalarType ?? 'any' ,
450
449
isExported : true ,
@@ -464,7 +463,7 @@ export class GraphQLAstExplorer {
464
463
( value ) => `"${ get ( value , 'name.value' ) } "` ,
465
464
) ;
466
465
return {
467
- kind : StructureKind . TypeAlias ,
466
+ kind : tsMorphLib . StructureKind . TypeAlias ,
468
467
name,
469
468
type : values . join ( ' | ' ) ,
470
469
isExported : true ,
@@ -475,7 +474,7 @@ export class GraphQLAstExplorer {
475
474
value : get ( value , 'name.value' ) ,
476
475
} ) ) ;
477
476
return {
478
- kind : StructureKind . Enum ,
477
+ kind : tsMorphLib . StructureKind . Enum ,
479
478
name,
480
479
members,
481
480
isExported : true ,
@@ -494,7 +493,7 @@ export class GraphQLAstExplorer {
494
493
) ;
495
494
496
495
return {
497
- kind : StructureKind . TypeAlias ,
496
+ kind : tsMorphLib . StructureKind . TypeAlias ,
498
497
name,
499
498
type : types . join ( ' | ' ) ,
500
499
isExported : true ,
0 commit comments