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 11/** Provides classes for working with ECMAScript 2015 modules. */
22
33import javascript
4+ private import semmle.javascript.internal.CachedStages
45
56/**
67 * An ECMAScript 2015 module.
@@ -654,7 +655,9 @@ abstract class ReExportDeclaration extends ExportDeclaration {
654655 ES2015Module getReExportedES2015Module ( ) { result = getReExportedModule ( ) }
655656
656657 /** Gets the module from which this declaration re-exports. */
658+ cached
657659 Module getReExportedModule ( ) {
660+ Stages:: Imports:: ref ( ) and
658661 result .getFile ( ) = getEnclosingModule ( ) .resolve ( getImportedPath ( ) .( PathExpr ) )
659662 or
660663 result = resolveFromTypeRoot ( )
Original file line number Diff line number Diff line change @@ -162,6 +162,8 @@ module Stages {
162162 exists ( any ( Import i ) .getImportedModule ( ) )
163163 or
164164 exists ( DataFlow:: moduleImport ( _) )
165+ or
166+ exists ( any ( ReExportDeclaration d ) .getReExportedModule ( ) )
165167 }
166168 }
167169
You can’t perform that action at this time.
0 commit comments