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 {
374
374
exists ( SSA:: implicitInit ( [ nm .getModuleVariable ( ) , nm .getExportsVariable ( ) ] ) )
375
375
)
376
376
)
377
- or
378
- m = any ( CanonicalName n | isDefined ( n ) ) .getExternalModuleName ( )
379
377
} or
380
378
MkModuleImport ( string m ) {
381
379
imports ( _, m )
382
380
or
383
- m = any ( CanonicalName n | isUsed ( n ) ) .getExternalModuleName ( )
384
- or
385
381
any ( TypeAnnotation n ) .hasQualifiedName ( m , _)
382
+ or
383
+ any ( Type t ) .hasUnderlyingType ( m , _)
386
384
} or
387
385
MkClassInstance ( DataFlow:: ClassNode cls ) { cls = trackDefNode ( _) and hasSemantics ( cls ) } or
388
386
MkAsyncFuncResult ( DataFlow:: FunctionNode f ) {
@@ -431,20 +429,6 @@ module API {
431
429
)
432
430
}
433
431
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
-
448
432
/**
449
433
* Holds if `rhs` is the right-hand side of a definition of a node that should have an
450
434
* incoming edge from `base` labeled `lbl` in the API graph.
You can’t perform that action at this time.
0 commit comments