File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
lib/semmle/javascript/internal
test/library-tests/UnderlyingTypes Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ module TypeResolution {
178
178
// Support JSDoc expressions of the form 'foo.bar' where 'foo' is an import
179
179
// at the top-level.
180
180
exists ( JSDocNamedTypeExpr expr , string prefix |
181
- expr .hasNameParts ( prefix , name ) and
181
+ expr .hasNameParts ( prefix , "." + name ) and
182
182
node1 = expr .getTopLevel ( ) .getScope ( ) .getVariable ( prefix ) and
183
183
node2 = expr
184
184
)
Original file line number Diff line number Diff line change
1
+ import * as e from 'express' ;
2
+ import { Response } from 'express' ;
3
+
4
+ /**
5
+ * @param {e.Request } req
6
+ */
7
+ function t1 ( req ) { // $ hasUnderlyingType='express'.Request SPURIOUS: hasUnderlyingType=e.Request
8
+ }
9
+
10
+ /**
11
+ * @param {Response } res
12
+ */
13
+ function t2 ( res ) { // $ MISSING: hasUnderlyingType='express'.Response SPURIOUS: hasUnderlyingType=Response
14
+ }
You can’t perform that action at this time.
0 commit comments