File tree Expand file tree Collapse file tree 2 files changed +28
-6
lines changed
lib/semmle/javascript/internal
test/library-tests/UnderlyingTypes Expand file tree Collapse file tree 2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,7 @@ module UnderlyingTypes {
6161 or
6262 exists ( Node mid |
6363 nodeRefersToModule ( mid , mod , qualifiedName ) and
64- ValueFlow:: step ( mid , node ) and
65- // avoid a lot of unnecessary tuples
66- not (
67- node instanceof Variable and
68- not node = any ( LocalVarTypeAccess ac ) .getVariable ( ) // needed for TypeofTypeExpr
69- )
64+ ValueFlow:: step ( mid , node )
7065 )
7166 or
7267 exists ( Node mid , string prefix , string step |
Original file line number Diff line number Diff line change 1+ import Express = require( 'express' ) ;
2+
3+ namespace A {
4+ export import E = Express ;
5+ }
6+ namespace B {
7+ export import Q = A
8+ }
9+ namespace C {
10+ import E = Express ;
11+ export const A = E ;
12+ }
13+
14+ function t1 ( x : A . E . Request ) { // $ hasUnderlyingType='express'.Request
15+ }
16+
17+ function t2 ( x : B . Q . E . Request ) { // $ hasUnderlyingType='express'.Request
18+ }
19+
20+ function t3 ( x : typeof Express ) { // $ hasUnderlyingType='express'
21+ }
22+
23+ function t4 ( x : typeof A . E ) { // $ hasUnderlyingType='express'
24+ }
25+
26+ function t5 ( x : typeof C . A ) { // $ hasUnderlyingType='express'
27+ }
You can’t perform that action at this time.
0 commit comments