From b71e3f40c3b7efbb0ebc5a2bc980067da7470fa5 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Mon, 21 Nov 2022 15:55:06 -0500 Subject: [PATCH] docs: make a note about target change --- docs/upgrade-to-v5.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/upgrade-to-v5.md b/docs/upgrade-to-v5.md index 02e90efeb..c4c3773ad 100644 --- a/docs/upgrade-to-v5.md +++ b/docs/upgrade-to-v5.md @@ -44,3 +44,9 @@ new TextDecoder('utf-16le').decode(bin.value(true)); > **TL;DR**: TODO TODO(NODE-4771): serializeFunctions bug fix makes function names outside the ascii range get serialized correctly + +### TS "target" set to es2020 + +We have set our typescript compilation target to `es2020` which aligns with our minimum supported Node.js version 14+. The following is from the typescript release notes on es2020 support, so it's some of the syntax that can be expected to be preserved after compilation: + +> This will preserve newer ECMAScript 2020 features like optional chaining, nullish coalescing, export * as ns, and dynamic import(...) syntax. It also means bigint literals now have a stable target below esnext.