@@ -318,7 +318,7 @@ module API {
318
318
result = Impl:: MkCanonicalNameUse ( tn ) .( Node ) .getInstance ( )
319
319
)
320
320
or
321
- result = Impl:: MkHasUnderlyingType ( moduleName , exportedName )
321
+ result = Impl:: MkHasUnderlyingType ( moduleName , exportedName ) . ( Node ) . getInstance ( )
322
322
}
323
323
}
324
324
@@ -416,7 +416,7 @@ module API {
416
416
isUsed ( n )
417
417
} or
418
418
/**
419
- * An instance of a TypeScript type, identified by name of the type-annotation.
419
+ * A TypeScript type, identified by name of the type-annotation.
420
420
* This API node is exclusively used by `API::Node::ofType`.
421
421
*/
422
422
MkHasUnderlyingType ( string moduleName , string exportName ) {
@@ -649,6 +649,12 @@ module API {
649
649
ref = getANodeWithType ( tn )
650
650
)
651
651
or
652
+ exists ( string moduleName , string exportName |
653
+ base = MkHasUnderlyingType ( moduleName , exportName ) and
654
+ lbl = Label:: instance ( ) and
655
+ ref .( DataFlow:: SourceNode ) .hasUnderlyingType ( moduleName , exportName )
656
+ )
657
+ or
652
658
exists ( DataFlow:: InvokeNode call |
653
659
base = MkSyntheticCallbackArg ( _, _, call ) and
654
660
lbl = Label:: parameter ( 1 ) and
@@ -688,12 +694,6 @@ module API {
688
694
nd = MkUse ( ref )
689
695
or
690
696
exists ( CanonicalName n | nd = MkCanonicalNameUse ( n ) | ref .asExpr ( ) = n .getAnAccess ( ) )
691
- or
692
- exists ( string moduleName , string exportsName |
693
- nd = MkHasUnderlyingType ( moduleName , exportsName )
694
- |
695
- ref .( DataFlow:: SourceNode ) .hasUnderlyingType ( moduleName , exportsName )
696
- )
697
697
}
698
698
699
699
/** Holds if module `m` exports `rhs`. */
0 commit comments