We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7de5fd0 commit 7779e9bCopy full SHA for 7779e9b
1 file changed
javascript/ql/test/library-tests/UnderlyingTypes/contextualTypes.ts
@@ -0,0 +1,29 @@
1
+import * as express from 'express';
2
+
3
+interface Options {
4
+ handle(req: express.Request): void; // $ hasUnderlyingType='express'.Request
5
+}
6
7
+declare function doSomething(options: Options);
8
9
+function t1() {
10
+ doSomething({
11
+ handle(req) { // $ MISSING: hasUnderlyingType='express'.Request
12
+ }
13
+ });
14
15
16
+function t2(callback: ((opts: Options) => void) | undefined) {
17
+ callback({
18
+ handle(req) { } // $ MISSING: hasUnderlyingType='express'.Request
19
+ })
20
+ callback!({
21
22
23
24
25
+function t3(): Options {
26
+ return {
27
28
29
0 commit comments