From bbdfeebd9eb2f9b31169edf5be8eb31adb367a1c Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Sat, 5 Oct 2024 03:08:11 -0400 Subject: [PATCH] process: add `process.features.typescript` PR-URL: https://github.com/nodejs/node/pull/54295 Reviewed-By: James M Snell Reviewed-By: Yagiz Nizipli Reviewed-By: Marco Ippolito Reviewed-By: Matteo Collina Reviewed-By: Antoine du Hamel --- doc/api/process.md | 13 +++++++++++ lib/internal/bootstrap/node.js | 23 ++++++++++++++++++++ test/es-module/test-typescript.mjs | 28 ++++++++++++++++++++++++ test/parallel/test-process-features.js | 30 ++++++++++++++------------ 4 files changed, 80 insertions(+), 14 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index 124b54dfea3e3e..0008ecbbc01b40 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1976,6 +1976,19 @@ added: v0.5.3 A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. +## `process.features.typescript` + + + +> Stability: 1.0 - Early development + +* {boolean|string} + +A value that is `"strip"` if Node.js is run with `--experimental-strip-types`, +`"transform"` if Node.js is run with `--experimental-transform-types`, and `false` otherwise. + ## `process.features.uv`