Skip to content

Commit 2d8d11f

Browse files
committed
JS: Restrict type-only exports in API graphs
1 parent 0e0fb0e commit 2d8d11f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

javascript/ql/lib/semmle/javascript/ApiGraphs.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,6 +1635,7 @@ private predicate exports(string m, DataFlow::Node rhs) {
16351635
/** Holds if module `m` exports `rhs` under the name `prop`. */
16361636
private predicate exports(string m, string prop, DataFlow::Node rhs) {
16371637
exists(ExportDeclaration exp | exp.getEnclosingModule() = importableModule(m) |
1638+
not exp.isTypeOnly() and
16381639
rhs = exp.getSourceNode(prop)
16391640
or
16401641
exists(Variable v |

0 commit comments

Comments
 (0)