forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasync_inline.js
101 lines (79 loc) · 1.92 KB
/
async_inline.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
'use strict';
var Curry = require("../../lib/js/curry.js");
var React = require("react");
async function willBeInlined(param) {
return 3;
}
var inlined = willBeInlined(undefined);
function wrapSomethingAsync(param) {
((async function (param) {
var test = await Promise.resolve("Test");
console.log(test);
})(777));
}
function wrapSomethingAsync2(param) {
((async function (param) {
var test = await Promise.resolve("Test");
console.log(test);
})(undefined));
}
async function doSomethingAsync(someAsyncFunction) {
return await Curry._1(someAsyncFunction, undefined);
}
var broken = doSomethingAsync;
var M = {
broken: broken
};
async function broken$1(someAsyncFunction) {
return await Curry._1(someAsyncFunction, undefined);
}
var broken$2 = broken$1;
function curriedId(x) {
return x;
}
async function curriedIdAsync(x) {
return x;
}
function uncurriedId(x) {
return x;
}
async function uncurriedIdAsync(x) {
return x;
}
var tcia = curriedIdAsync(3);
var tui = 3;
var tuia = uncurriedIdAsync(3);
function nested1(param) {
return async function (y) {
return await y;
};
}
async function nested2(param) {
return async function (y) {
return await y;
};
}
function onSubmit(param) {
return React.useCallback(async function (_a, b) {
return await b;
});
}
var tci = 3;
exports.willBeInlined = willBeInlined;
exports.inlined = inlined;
exports.wrapSomethingAsync = wrapSomethingAsync;
exports.wrapSomethingAsync2 = wrapSomethingAsync2;
exports.M = M;
exports.broken = broken$2;
exports.curriedId = curriedId;
exports.curriedIdAsync = curriedIdAsync;
exports.uncurriedId = uncurriedId;
exports.uncurriedIdAsync = uncurriedIdAsync;
exports.tci = tci;
exports.tcia = tcia;
exports.tui = tui;
exports.tuia = tuia;
exports.nested1 = nested1;
exports.nested2 = nested2;
exports.onSubmit = onSubmit;
/* inlined Not a pure module */