File tree 2 files changed +28
-0
lines changed
javascript/ql/test/ApiGraphs/async-await
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ | wrap-async-in-thunk.js:5:25:5:137 | /* def= ... ed() */ | Node not found on this line (but there is one on line wrap-async-in-thunk.js:14). |
2
+ | wrap-async-in-thunk.js:5:25:5:137 | /* def= ... ed() */ | Node not found on this line (but there is one on line wrap-async-in-thunk.js:24). |
Original file line number Diff line number Diff line change
1
+ import * as t from "testlib" ;
2
+
3
+ async function getData1 ( ) {
4
+ const data = await fetch ( "https://example.com/content" ) ;
5
+ return data . json ( ) ; /* def=moduleImport("testlib").getMember("exports").getMember("foo").getParameter(0).getReturn().getPromised() */
6
+ }
7
+
8
+ export function use1 ( ) {
9
+ t . foo ( ( ) => getData1 ( ) ) ;
10
+ }
11
+
12
+ async function getData2 ( ) {
13
+ const data = await fetch ( "https://example.com/content" ) ;
14
+ return data . json ( ) ; /* def=moduleImport("testlib").getMember("exports").getMember("foo").getParameter(0).getReturn().getPromised() */
15
+ }
16
+
17
+ export function use2 ( ) {
18
+ t . foo ( getData2 ) ;
19
+ }
20
+
21
+ export function use3 ( ) {
22
+ t . foo ( async ( ) => {
23
+ const data = await fetch ( "https://example.com/content" ) ;
24
+ return data . json ( ) ; /* def=moduleImport("testlib").getMember("exports").getMember("foo").getParameter(0).getReturn().getPromised() */
25
+ } ) ;
26
+ }
You can’t perform that action at this time.
0 commit comments