Currently, the lib and target fields are pointing at es2019, but newer versions are available in the latest version of TypeScript.
I recommend setting lib to es2022 but target to es2021 since es2021 is fully supported in Node 16: https://node.green/#ES2021 but es2022 is not yet. Most of the differences between es2021 and es2022 are in supported syntax. By setting lib to es2022 but target to es2021, we can take advantage of newer syntax in our code, but TypeScript will transpile down to syntax compatible with es2021/Node 16.
It seems there aren't really any built-in methods/classes/etc added between es2019 and es2022 that would break us in a Node environment that does not use Babel, other than the Error.cause property: https://node.green/#ES2022-features-Error-cause-property
Note: After doing this, we should make sure that any repo that we integrate this into that also uses Babel is using the latest version of core-js.
Currently, the
libandtargetfields are pointing ates2019, but newer versions are available in the latest version of TypeScript.I recommend setting
libtoes2022buttargettoes2021sincees2021is fully supported in Node 16: https://node.green/#ES2021 butes2022is not yet. Most of the differences betweenes2021andes2022are in supported syntax. By settinglibtoes2022buttargettoes2021, we can take advantage of newer syntax in our code, but TypeScript will transpile down to syntax compatible withes2021/Node 16.It seems there aren't really any built-in methods/classes/etc added between
es2019andes2022that would break us in a Node environment that does not use Babel, other than theError.causeproperty: https://node.green/#ES2022-features-Error-cause-propertyNote: After doing this, we should make sure that any repo that we integrate this into that also uses Babel is using the latest version of
core-js.