File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
javascript/ql/test/library-tests/UnderlyingTypes Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ import * as express from 'express' ;
2+
3+ type Box1 < T > = {
4+ value : T ;
5+ other : string ;
6+ } ;
7+ function t1 ( b : Box1 < express . Request > ) {
8+ b . value ; // $ MISSING: hasUnderlyingType='express'.Request
9+ b . other ;
10+ }
11+
12+ interface Box2 < T > {
13+ value : T ;
14+ other : string ;
15+ }
16+ function t2 ( b : Box2 < express . Request > ) {
17+ b . value ; // $ MISSING: hasUnderlyingType='express'.Request
18+ b . other ;
19+ }
20+
21+ class Box3 < T > {
22+ value : T ;
23+ other : string ;
24+ }
25+ function t3 ( b : Box3 < express . Request > ) {
26+ b . value ; // $ MISSING: hasUnderlyingType='express'.Request
27+ b . other ;
28+ }
29+
30+ abstract class Box4 < T > {
31+ abstract getValue ( ) : T ;
32+ abstract getOther ( ) : string ;
33+ }
34+ function t4 ( b : Box4 < express . Request > ) {
35+ b . getValue ( ) ; // $ MISSING: hasUnderlyingType='express'.Request
36+ b . getOther ( ) ;
37+ }
38+
39+ type Box5 < T > = {
40+ value : T & { blah : string } ;
41+ other : string ;
42+ } ;
43+ function t5 ( b : Box5 < express . Request > ) {
44+ b . value ; // $ MISSING: hasUnderlyingType='express'.Request
45+ b . other ;
46+ }
You can’t perform that action at this time.
0 commit comments