@@ -6,21 +6,21 @@ import type {
66 TSModuleBlock ,
77 TSModuleDeclaration ,
88 TSTypeAliasDeclaration ,
9- ClassBody ,
10- TSInterfaceBody ,
119} from '@typescript-eslint/types/dist/ts-estree' ;
1210import type { AST , TSESTreeOptions } from '@typescript-eslint/typescript-estree' ;
1311import { AST_NODE_TYPES } from '@typescript-eslint/typescript-estree' ;
1412import type { Logger } from 'winston' ;
1513import type { ResolutionContext } from '../resolution/ResolutionContext' ;
16- import type { ClassLoaded ,
14+ import type {
15+ ClassLoaded ,
1716 ClassReference ,
1817 ClassReferenceLoaded ,
1918 EnumLoaded ,
2019 GenericTypes ,
2120 InterfaceLoaded ,
2221 TypeLoaded ,
23- GenericallyTyped } from './ClassIndex' ;
22+ GenericallyTyped ,
23+ } from './ClassIndex' ;
2424import type { CommentLoader } from './CommentLoader' ;
2525
2626/**
@@ -202,7 +202,6 @@ export class ClassLoader {
202202 ast,
203203 abstract : declaration . abstract ,
204204 generics : this . collectGenericTypes ( declaration ) ,
205- memberKeys : this . collectClassMembers ( declaration . body ) ,
206205 } ) ;
207206 }
208207
@@ -216,7 +215,6 @@ export class ClassLoader {
216215 ast,
217216 abstract : declaration . abstract ,
218217 generics : this . collectGenericTypes ( declaration ) ,
219- memberKeys : this . collectClassMembers ( declaration . body ) ,
220218 } ) ;
221219 }
222220
@@ -231,7 +229,6 @@ export class ClassLoader {
231229 declaration,
232230 ast,
233231 generics : this . collectGenericTypes ( declaration ) ,
234- memberKeys : this . collectClassMembers ( declaration . body ) ,
235232 } ) ;
236233 }
237234
@@ -244,7 +241,6 @@ export class ClassLoader {
244241 declaration,
245242 ast,
246243 generics : this . collectGenericTypes ( declaration ) ,
247- memberKeys : this . collectClassMembers ( declaration . body ) ,
248244 } ) ;
249245 }
250246 }
@@ -676,31 +672,6 @@ export class ClassLoader {
676672 exportAssignment,
677673 } ;
678674 }
679-
680- /**
681- * Obtain the class member keys.
682- * This should correspond to the keys that are available within the `keyof` range of this class
683- * @param body A class or interface body
684- */
685- public collectClassMembers ( body : ClassBody | TSInterfaceBody ) : string [ ] {
686- const members : string [ ] = [ ] ;
687- for ( const element of body . body ) {
688- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
689- switch ( element . type ) {
690- case AST_NODE_TYPES . ClassProperty :
691- case AST_NODE_TYPES . TSAbstractClassProperty :
692- case AST_NODE_TYPES . MethodDefinition :
693- case AST_NODE_TYPES . TSAbstractMethodDefinition :
694- case AST_NODE_TYPES . TSPropertySignature :
695- case AST_NODE_TYPES . TSMethodSignature :
696- if ( element . key . type === 'Identifier' ) {
697- members . push ( element . key . name ) ;
698- }
699- break ;
700- }
701- }
702- return members ;
703- }
704675}
705676
706677export interface ClassLoaderArgs {
0 commit comments