File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1
1
/** Provides classes for working with ECMAScript 2015 modules. */
2
2
3
3
import javascript
4
+ private import semmle.javascript.internal.CachedStages
4
5
5
6
/**
6
7
* An ECMAScript 2015 module.
@@ -654,7 +655,9 @@ abstract class ReExportDeclaration extends ExportDeclaration {
654
655
ES2015Module getReExportedES2015Module ( ) { result = getReExportedModule ( ) }
655
656
656
657
/** Gets the module from which this declaration re-exports. */
658
+ cached
657
659
Module getReExportedModule ( ) {
660
+ Stages:: Imports:: ref ( ) and
658
661
result .getFile ( ) = getEnclosingModule ( ) .resolve ( getImportedPath ( ) .( PathExpr ) )
659
662
or
660
663
result = resolveFromTypeRoot ( )
Original file line number Diff line number Diff line change @@ -162,6 +162,8 @@ module Stages {
162
162
exists ( any ( Import i ) .getImportedModule ( ) )
163
163
or
164
164
exists ( DataFlow:: moduleImport ( _) )
165
+ or
166
+ exists ( any ( ReExportDeclaration d ) .getReExportedModule ( ) )
165
167
}
166
168
}
167
169
You can’t perform that action at this time.
0 commit comments