File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
lib/semmle/javascript/internal
test/library-tests/UnderlyingTypes Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,12 @@ module UnderlyingTypes {
3333 * If `mod` is the string `"global"`, `node` refers to a global access path.
3434 */
3535 predicate nodeRefersToModule ( Node node , string mod , string qualifiedName ) {
36- exists ( Import imprt |
37- node = imprt .getImportedPath ( ) and
38- mod = normalizeModuleName ( imprt .getImportedPath ( ) .getValue ( ) ) and
36+ exists ( PathExpr path |
37+ path = any ( Import imprt ) .getImportedPath ( ) or
38+ path = any ( ReExportDeclaration e ) .getImportedPath ( )
39+ |
40+ node = path and
41+ mod = normalizeModuleName ( path .getValue ( ) ) and
3942 isExternalModuleName ( mod ) and
4043 qualifiedName = ""
4144 )
Original file line number Diff line number Diff line change @@ -7,16 +7,16 @@ function t1(req: Request) { // none
77function t2 ( res : Response ) { // none
88}
99
10- function t3 ( req : wrapper . Request ) { // $ MISSING: hasUnderlyingType='express'.Request
10+ function t3 ( req : wrapper . Request ) { // $ hasUnderlyingType='express'.Request
1111}
1212
13- function t4 ( res : wrapper . Response ) { // $ MISSING: hasUnderlyingType='express'.Response
13+ function t4 ( res : wrapper . Response ) { // $ hasUnderlyingType='express'.Response
1414}
1515
16- function t5 ( req : w . wrapper . Request ) { // $ MISSING: hasUnderlyingType='express'.Request
16+ function t5 ( req : w . wrapper . Request ) { // $ hasUnderlyingType='express'.Request
1717}
1818
19- function t6 ( res : w . wrapper . Response ) { // $ MISSING: hasUnderlyingType='express'.Response
19+ function t6 ( res : w . wrapper . Response ) { // $ hasUnderlyingType='express'.Response
2020}
2121
2222function t7 ( req : w . Request ) { // none
You can’t perform that action at this time.
0 commit comments