@@ -18,7 +18,7 @@ export function getTypeServices<
18
18
name : string | RegExp ,
19
19
qualified ?: { name : RegExp } ,
20
20
) : boolean => {
21
- const type = getType ( node ) ;
21
+ const type = getTypeAtLocation ( node ) ;
22
22
return tsutilsEtcCouldBeType (
23
23
type ,
24
24
name ,
@@ -56,10 +56,6 @@ export function getTypeServices<
56
56
) ;
57
57
} ;
58
58
59
- const getType = ( node : TSESTree . Node ) : ts . Type => {
60
- return getTypeAtLocation ( node ) ;
61
- } ;
62
-
63
59
return {
64
60
couldBeBehaviorSubject : ( node : TSESTree . Node ) =>
65
61
couldBeType ( node , 'BehaviorSubject' ) ,
@@ -68,7 +64,7 @@ export function getTypeServices<
68
64
if ( isArrowFunctionExpression ( node ) || isFunctionDeclaration ( node ) ) {
69
65
return true ;
70
66
}
71
- return couldBeFunction ( getType ( node ) ) ;
67
+ return couldBeFunction ( getTypeAtLocation ( node ) ) ;
72
68
} ,
73
69
couldBeMonoTypeOperatorFunction : ( node : TSESTree . Node ) =>
74
70
couldBeType ( node , 'MonoTypeOperatorFunction' ) ,
@@ -79,10 +75,8 @@ export function getTypeServices<
79
75
couldReturnObservable : ( node : TSESTree . Node ) =>
80
76
couldReturnType ( node , 'Observable' ) ,
81
77
couldReturnType,
82
- getType,
83
- isAny : ( node : TSESTree . Node ) => tsutils . isIntrinsicAnyType ( getType ( node ) ) ,
84
- isReferenceType : ( node : TSESTree . Node ) => tsutils . isTypeReference ( getType ( node ) ) ,
85
- isUnknown : ( node : TSESTree . Node ) => tsutils . isIntrinsicUnknownType ( getType ( node ) ) ,
86
- typeChecker,
78
+ isAny : ( node : TSESTree . Node ) => tsutils . isIntrinsicAnyType ( getTypeAtLocation ( node ) ) ,
79
+ isReferenceType : ( node : TSESTree . Node ) => tsutils . isTypeReference ( getTypeAtLocation ( node ) ) ,
80
+ isUnknown : ( node : TSESTree . Node ) => tsutils . isIntrinsicUnknownType ( getTypeAtLocation ( node ) ) ,
87
81
} ;
88
82
}
0 commit comments