@@ -313,7 +313,7 @@ module API {
313313 module Node {
314314 /** Gets a node whose type has the given qualified name. */
315315 Node ofType ( string moduleName , string exportedName ) {
316- result = Impl:: MkHasUnderlyingType ( moduleName , exportedName ) .( Node ) .getInstance ( )
316+ result = Impl:: MkTypeUse ( moduleName , exportedName ) .( Node ) .getInstance ( )
317317 }
318318 }
319319
@@ -388,11 +388,8 @@ module API {
388388 } or
389389 MkDef ( DataFlow:: Node nd ) { rhs ( _, _, nd ) } or
390390 MkUse ( DataFlow:: Node nd ) { use ( _, _, nd ) } or
391- /**
392- * A TypeScript type, identified by name of the type-annotation.
393- * This API node is exclusively used by `API::Node::ofType`.
394- */
395- MkHasUnderlyingType ( string moduleName , string exportName ) {
391+ /** A use of a TypeScript type. */
392+ MkTypeUse ( string moduleName , string exportName ) {
396393 any ( TypeAnnotation n ) .hasQualifiedName ( moduleName , exportName )
397394 or
398395 any ( Type t ) .hasUnderlyingType ( moduleName , exportName )
@@ -406,7 +403,7 @@ module API {
406403 class TNonModuleDef =
407404 MkModuleExport or MkClassInstance or MkAsyncFuncResult or MkDef or MkSyntheticCallbackArg ;
408405
409- class TUse = MkModuleUse or MkModuleImport or MkUse or MkHasUnderlyingType ;
406+ class TUse = MkModuleUse or MkModuleImport or MkUse or MkTypeUse ;
410407
411408 private predicate hasSemantics ( DataFlow:: Node nd ) { not nd .getTopLevel ( ) .isExterns ( ) }
412409
@@ -584,7 +581,7 @@ module API {
584581 )
585582 or
586583 exists ( string moduleName , string exportName |
587- base = MkHasUnderlyingType ( moduleName , exportName ) and
584+ base = MkTypeUse ( moduleName , exportName ) and
588585 lbl = Label:: instance ( ) and
589586 ref .( DataFlow:: SourceNode ) .hasUnderlyingType ( moduleName , exportName )
590587 )
@@ -823,7 +820,7 @@ module API {
823820 exists ( string moduleName , string exportName |
824821 pred = MkModuleImport ( moduleName ) and
825822 lbl = Label:: member ( exportName ) and
826- succ = MkHasUnderlyingType ( moduleName , exportName )
823+ succ = MkTypeUse ( moduleName , exportName )
827824 )
828825 or
829826 exists ( DataFlow:: Node nd , DataFlow:: FunctionNode f |
0 commit comments