File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -374,15 +374,13 @@ module API {
374374 exists ( SSA:: implicitInit ( [ nm .getModuleVariable ( ) , nm .getExportsVariable ( ) ] ) )
375375 )
376376 )
377- or
378- m = any ( CanonicalName n | isDefined ( n ) ) .getExternalModuleName ( )
379377 } or
380378 MkModuleImport ( string m ) {
381379 imports ( _, m )
382380 or
383- m = any ( CanonicalName n | isUsed ( n ) ) .getExternalModuleName ( )
384- or
385381 any ( TypeAnnotation n ) .hasQualifiedName ( m , _)
382+ or
383+ any ( Type t ) .hasUnderlyingType ( m , _)
386384 } or
387385 MkClassInstance ( DataFlow:: ClassNode cls ) { cls = trackDefNode ( _) and hasSemantics ( cls ) } or
388386 MkAsyncFuncResult ( DataFlow:: FunctionNode f ) {
@@ -431,20 +429,6 @@ module API {
431429 )
432430 }
433431
434- private predicate isUsed ( CanonicalName n ) {
435- exists ( n .( TypeName ) .getAnAccess ( ) ) or
436- exists ( n .( Namespace ) .getAnAccess ( ) )
437- }
438-
439- private predicate isDefined ( CanonicalName n ) {
440- exists ( ASTNode def |
441- def = n .( TypeName ) .getADefinition ( ) or
442- def = n .( Namespace ) .getADefinition ( )
443- |
444- not def .isAmbient ( )
445- )
446- }
447-
448432 /**
449433 * Holds if `rhs` is the right-hand side of a definition of a node that should have an
450434 * incoming edge from `base` labeled `lbl` in the API graph.
You can’t perform that action at this time.
0 commit comments