From 39ac40c24a306bbd91ff199cc6406550b16a8e97 Mon Sep 17 00:00:00 2001 From: Skyler Kehren Date: Tue, 14 Sep 2021 21:55:42 +0200 Subject: [PATCH] Update output target to es2018 for Node 10 As prompted by eduter on Discord, Node 10 (current game runtime) supports es2018. This is also confirmed by this stackoverflow post[1] and node.green [2]. This also sets the lib to "es2018" vs "esnext". With esnext it's possible to reference standard library functions that don't exist in es2018 and are not polyfilled by tsc. Ex. String.prototype.matchAll from es2020. This would cause a runtime error. If users of this library want to provide their own polyfills, they can change the lib back to "esnext" or some other future version. [1] https://stackoverflow.com/questions/51716406/typescript-tsconfig-settings-for-node-js-10 [2] https://node.green/#ES2018 --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index a8dd055..9b1ca35 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "module": "esnext", - "lib": ["esnext"], - "target": "es2017", + "lib": ["es2018"], + "target": "es2018", "moduleResolution": "Node", "outDir": "dist", "baseUrl": "src/",