Skip to content

Commit acbb62a

Browse files
committed
Bump target to ES2019
1 parent 60dc0f8 commit acbb62a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/playground/fengari.worker.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const redirectPrintStream = `
1919

2020
function transformLuaValue(rootValue: any) {
2121
const seenLuaValues = new Set<any>();
22-
function transform(luaValue: any) {
22+
function transform(luaValue: any): any {
2323
if (typeof luaValue !== "function") return luaValue;
2424

2525
if (luaValue.toString().startsWith("function:")) {
@@ -33,12 +33,7 @@ function transformLuaValue(rootValue: any) {
3333

3434
seenLuaValues.add(luaValue.toString());
3535

36-
// TODO: Object.fromEntries
37-
const result: Record<string, any> = {};
38-
for (const [key, value] of luaValue) {
39-
result[key] = transform(value);
40-
}
41-
return result;
36+
return Object.fromEntries([...luaValue].map(([key, value]) => [key, transform(value)]));
4237
}
4338

4439
return transform(rootValue);

src/tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
"allowSyntheticDefaultImports": true,
66
"resolveJsonModule": true,
77
"sourceMap": true,
8-
// TODO: Bump to latest once Edge 18 support would end
9-
"target": "es2017",
10-
"lib": ["es2017", "dom", "dom.iterable", "webworker"],
8+
"target": "es2019",
9+
"lib": ["es2019", "dom", "dom.iterable", "webworker"],
1110
"strict": true
1211
}
1312
}

0 commit comments

Comments
 (0)