Skip to content

Commit 3d87d19

Browse files
committed
JS: Update with tests for globals
1 parent efea150 commit 3d87d19

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function t1(el: HTMLElement) { } // $ hasUnderlyingType=HTMLElement
2+
3+
/**
4+
* @param {HTMLInputElement} el
5+
*/
6+
function t2(el) { // $ hasUnderlyingType=HTMLInputElement
7+
}
8+
9+
function t3(req: Express.Request) { // $ hasUnderlyingType=Express.Request
10+
}

javascript/ql/test/library-tests/UnderlyingTypes/namespaceImport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function t1(e: typeof express) { // $ hasUnderlyingType='express'
66
function t2(req: express.Request) { // $ hasUnderlyingType='express'.Request
77
}
88

9-
function t3(req: Request) { // none, not in scope
9+
function t3(req: Request) { // $ hasUnderlyingType=Request - not in scope, refers to a global
1010
}
1111

1212
type E = typeof express;

0 commit comments

Comments
 (0)