We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d40fa7 commit 50420a2Copy full SHA for 50420a2
javascript/ql/lib/semmle/javascript/internal/TypeResolution.qll
@@ -155,6 +155,14 @@ module TypeResolution {
155
name = spec.getImportedName() and
156
node2 = spec.getLocal()
157
)
158
+ or
159
+ // Support JSDoc expressions of the form 'foo.bar' where 'foo' is an import
160
+ // at the top-level.
161
+ exists(JSDocNamedTypeExpr expr, string prefix |
162
+ expr.hasNameParts(prefix, name) and
163
+ node1 = expr.getTopLevel().getScope().getVariable(prefix) and
164
+ node2 = expr
165
+ )
166
}
167
168
private signature module TypeResolutionInputSig {
0 commit comments