File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
javascript/ql/lib/semmle/javascript Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -735,6 +735,14 @@ module API {
735735 */
736736 cached
737737 private module Impl {
738+ private predicate hasTypeUse ( string moduleName , string exportName ) {
739+ any ( TypeAnnotation n ) .hasUnderlyingType ( moduleName , exportName )
740+ }
741+
742+ overlay [ local]
743+ private predicate hasTypeUseLocal ( string moduleName , string exportName ) =
744+ forceLocal( hasTypeUse / 2 ) ( moduleName , exportName )
745+
738746 cached
739747 newtype TApiNode =
740748 MkRoot ( ) or
@@ -764,9 +772,7 @@ module API {
764772 } or
765773 MkUse ( DataFlow:: Node nd ) { nd instanceof DataFlow:: SourceNode } or
766774 /** A use of a TypeScript type. */
767- MkTypeUse ( string moduleName , string exportName ) {
768- any ( TypeAnnotation n ) .hasUnderlyingType ( moduleName , exportName )
769- } or
775+ MkTypeUse ( string moduleName , string exportName ) { hasTypeUseLocal ( moduleName , exportName ) } or
770776 MkSyntheticCallbackArg ( DataFlow:: InvokeNode nd )
771777
772778 class TDef = MkModuleDef or TNonModuleDef ;
You can’t perform that action at this time.
0 commit comments