JS: Restrict type-only exports in API graphs

This commit is contained in:
Asger F
2024-01-17 15:35:33 +01:00
parent 0e0fb0e52d
commit 2d8d11fa78

View File

@@ -1635,6 +1635,7 @@ private predicate exports(string m, DataFlow::Node rhs) {
/** Holds if module `m` exports `rhs` under the name `prop`. */
private predicate exports(string m, string prop, DataFlow::Node rhs) {
exists(ExportDeclaration exp | exp.getEnclosingModule() = importableModule(m) |
not exp.isTypeOnly() and
rhs = exp.getSourceNode(prop)
or
exists(Variable v |