File tree 11 files changed +37
-37
lines changed
javascript/ql/test/library-tests/UnderlyingTypes
11 files changed +37
-37
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as express from 'express';
3
3
function getRequest ( ) : express . Request { }
4
4
5
5
function t1 ( ) {
6
- getRequest ( ) ; // $ hasUnderlyingType='express'.Request
6
+ getRequest ( ) ; // $ MISSING: hasUnderlyingType='express'.Request
7
7
}
8
8
9
9
declare function getRequestAmbient ( ) : express . Request ;
@@ -17,16 +17,16 @@ class C {
17
17
}
18
18
19
19
function t3 ( c : C ) {
20
- c . method ( ) ; // $ hasUnderlyingType='express'.Request
21
- new C ( ) . method ( ) ; // $ hasUnderlyingType='express'.Request
20
+ c . method ( ) ; // $ MISSING: hasUnderlyingType='express'.Request
21
+ new C ( ) . method ( ) ; // $ MISSING: hasUnderlyingType='express'.Request
22
22
}
23
23
24
24
function callback ( fn : ( req : express . Request ) => void ) { // $ SPURIOUS: hasUnderlyingType='express'.Request - req seems to be a SourceNode
25
25
}
26
26
27
27
function t4 ( ) {
28
28
callback ( function (
29
- req // $ hasUnderlyingType='express'.Request
29
+ req // $ MISSING: hasUnderlyingType='express'.Request
30
30
) { }
31
31
) ;
32
32
}
Original file line number Diff line number Diff line change 1
1
import { Request , Response } from './expressBulkExport' ;
2
2
3
- function t1 ( req : Request ) { // $ hasUnderlyingType='express'.Request
3
+ function t1 ( req : Request ) { // $ MISSING: hasUnderlyingType='express'.Request SPURIOUS: hasUnderlyingType='expressBulkExport.ts '.Request
4
4
}
5
5
6
- function t2 ( res : Response ) { // $ hasUnderlyingType='express'.Response
6
+ function t2 ( res : Response ) { // $ MISSING: hasUnderlyingType='express'.Response SPURIOUS: hasUnderlyingType='expressBulkExport.ts '.Response
7
7
}
Original file line number Diff line number Diff line change 1
1
import { Request } from "./expressExportAssign" ;
2
2
3
- function t1 ( req : Request ) { // $ hasUnderlyingType='express'.Request
3
+ function t1 ( req : Request ) { // $ MISSING: hasUnderlyingType='express'.Request SPURIOUS: hasUnderlyingType='expressExportAssign.ts '.Request
4
4
}
Original file line number Diff line number Diff line change 1
1
import { E } from "./expressExportAssignWrapper" ;
2
2
3
- function t1 ( req : E . Request ) { // $ hasUnderlyingType='express'.Request
3
+ function t1 ( req : E . Request ) { // $ MISSING: hasUnderlyingType='express'.Request
4
4
}
Original file line number Diff line number Diff line change 1
1
import { Request , Response , R } from './expressSelectiveExport' ;
2
2
3
- function t1 ( req : Request ) { // $ hasUnderlyingType='express'.Request
3
+ function t1 ( req : Request ) { // $ MISSING: hasUnderlyingType='express'.Request SPURIOUS: hasUnderlyingType='expressSelectiveExport.ts '.Request
4
4
}
5
5
6
- function t2 ( res : Response ) { // none, not exported
6
+ function t2 ( res : Response ) { // $ SPURIOUS: hasUnderlyingType='expressSelectiveExport.ts'.Response - none, not exported
7
7
}
8
8
9
- function t3 ( res : R ) { // $ hasUnderlyingType='express'.Response
9
+ function t3 ( res : R ) { // $ MISSING: hasUnderlyingType='express'.Response SPURIOUS: hasUnderlyingType='expressSelectiveExport.ts'.R
10
10
}
Original file line number Diff line number Diff line change 1
1
import { Request , Response , wrapper } from './expressWrapperExport' ;
2
2
import * as w from './expressWrapperExport' ;
3
3
4
- function t1 ( req : Request ) { // none
4
+ function t1 ( req : Request ) { // $ SPURIOUS: hasUnderlyingType='expressWrapperExport.ts'.Request - none
5
5
}
6
6
7
- function t2 ( res : Response ) { // none
7
+ function t2 ( res : Response ) { // $ SPURIOUS: hasUnderlyingType='expressWrapperExport.ts'.Response - none
8
8
}
9
9
10
- function t3 ( req : wrapper . Request ) { // $ hasUnderlyingType='express'.Request
10
+ function t3 ( req : wrapper . Request ) { // $ MISSING: hasUnderlyingType='express'.Request
11
11
}
12
12
13
- function t4 ( res : wrapper . Response ) { // $ hasUnderlyingType='express'.Response
13
+ function t4 ( res : wrapper . Response ) { // $ MISSING: hasUnderlyingType='express'.Response
14
14
}
15
15
16
- function t5 ( req : w . wrapper . Request ) { // $ hasUnderlyingType='express'.Request
16
+ function t5 ( req : w . wrapper . Request ) { // $ MISSING: hasUnderlyingType='express'.Request
17
17
}
18
18
19
- function t6 ( res : w . wrapper . Response ) { // $ hasUnderlyingType='express'.Response
19
+ function t6 ( res : w . wrapper . Response ) { // $ MISSING: hasUnderlyingType='express'.Response
20
20
}
21
21
22
- function t7 ( req : w . Request ) { // none
22
+ function t7 ( req : w . Request ) { // $ SPURIOUS: hasUnderlyingType='expressWrapperExport.ts'.Request - none
23
23
}
24
24
25
- function t8 ( res : w . Response ) { // none
25
+ function t8 ( res : w . Response ) { // $ SPURIOUS: hasUnderlyingType='expressWrapperExport.ts'.Response - none
26
26
}
27
27
28
- function t9 ( e : typeof w . wrapper ) { // $ hasUnderlyingType='express'
28
+ function t9 ( e : typeof w . wrapper ) { // $ MISSING: hasUnderlyingType='express'
29
29
}
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import { Response } from 'express';
4
4
/**
5
5
* @param {e.Request } req
6
6
*/
7
- function t1 ( req ) { // $ hasUnderlyingType='express'.Request SPURIOUS: hasUnderlyingType=e.Request
7
+ function t1 ( req ) { // $ MISSING: hasUnderlyingType='express'.Request SPURIOUS: hasUnderlyingType=e.Request
8
8
}
9
9
10
10
/**
11
11
* @param {Response } res
12
12
*/
13
- function t2 ( res ) { // $ hasUnderlyingType='express'.Response SPURIOUS: hasUnderlyingType=Response
13
+ function t2 ( res ) { // $ MISSING: hasUnderlyingType='express'.Response SPURIOUS: hasUnderlyingType=Response
14
14
}
Original file line number Diff line number Diff line change @@ -11,17 +11,17 @@ namespace C {
11
11
export const A = E ;
12
12
}
13
13
14
- function t1 ( x : A . E . Request ) { // $ hasUnderlyingType='express'.Request
14
+ function t1 ( x : A . E . Request ) { // $ MISSING: hasUnderlyingType='express'.Request
15
15
}
16
16
17
- function t2 ( x : B . Q . E . Request ) { // $ hasUnderlyingType='express'.Request
17
+ function t2 ( x : B . Q . E . Request ) { // $ MISSING: hasUnderlyingType='express'.Request
18
18
}
19
19
20
- function t3 ( x : typeof Express ) { // $ hasUnderlyingType='express'
20
+ function t3 ( x : typeof Express ) { // $ MISSING: hasUnderlyingType='express'
21
21
}
22
22
23
- function t4 ( x : typeof A . E ) { // $ hasUnderlyingType='express'
23
+ function t4 ( x : typeof A . E ) { // $ MISSING: hasUnderlyingType='express'
24
24
}
25
25
26
- function t5 ( x : typeof C . A ) { // $ hasUnderlyingType='express'
26
+ function t5 ( x : typeof C . A ) { // $ MISSING: hasUnderlyingType='express'
27
27
}
Original file line number Diff line number Diff line change 1
1
import * as express from 'express' ;
2
2
3
- function t1 ( e : typeof express ) { // $ hasUnderlyingType='express'
3
+ function t1 ( e : typeof express ) { // $ MISSING: hasUnderlyingType='express'
4
4
}
5
5
6
6
function t2 ( req : express . Request ) { // $ hasUnderlyingType='express'.Request
7
7
}
8
8
9
- function t3 ( req : Request ) { // none, not in scope
9
+ function t3 ( req : Request ) { // $ SPURIOUS: hasUnderlyingType=Body hasUnderlyingType=Request - none, not in scope
10
10
}
11
11
12
12
type E = typeof express ;
13
13
14
- function t4 ( e : E ) { // $ hasUnderlyingType='express'
14
+ function t4 ( e : E ) { // $ MISSING: hasUnderlyingType='express'
15
15
}
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ interface Foo {
6
6
}
7
7
8
8
function t1 ( f : Foo ) {
9
- f . req ; // $ hasUnderlyingType='express'.Request
10
- f . e ; // $ hasUnderlyingType='express'
9
+ f . req ; // $ MISSING: hasUnderlyingType='express'.Request
10
+ f . e ; // $ MISSING: hasUnderlyingType='express'
11
11
12
12
const {
13
- req, // $ hasUnderlyingType='express'.Request
14
- e // $ hasUnderlyingType='express'
13
+ req, // $ MISSING: hasUnderlyingType='express'.Request
14
+ e // $ MISSING: hasUnderlyingType='express'
15
15
} = f ;
16
16
}
Original file line number Diff line number Diff line change @@ -4,17 +4,17 @@ interface MyRequest extends express.Request {
4
4
5
5
}
6
6
7
- function t1 ( req : MyRequest ) { // $ hasUnderlyingType='express'.Request
7
+ function t1 ( req : MyRequest ) { // $ MISSING: hasUnderlyingType='express'.Request
8
8
}
9
9
10
10
class MyRequestClass extends express . Request {
11
11
}
12
12
13
- function t2 ( req : MyRequestClass ) { // $ hasUnderlyingType='express'.Request
13
+ function t2 ( req : MyRequestClass ) { // $ MISSING: hasUnderlyingType='express'.Request
14
14
}
15
15
16
16
class MyRequestClass2 implements express . Request {
17
17
}
18
18
19
- function t3 ( req : MyRequestClass2 ) { // $ hasUnderlyingType='express'.Request
19
+ function t3 ( req : MyRequestClass2 ) { // $ MISSING: hasUnderlyingType='express'.Request
20
20
}
You can’t perform that action at this time.
0 commit comments