From 6964b539806e3b2103dd6b65572287b8a615f5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Wed, 25 Feb 2026 21:29:41 +0000 Subject: [PATCH] doc: fix module.stripTypeScriptTypes indentation PR-URL: https://github.com/nodejs/node/pull/61992 Reviewed-By: Chengzhong Wu Reviewed-By: Jacob Smith Reviewed-By: Marco Ippolito Reviewed-By: Harshitha K P Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- doc/api/module.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/api/module.md b/doc/api/module.md index cad96d23476c64..6ed09d996823c0 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -259,12 +259,13 @@ changes: * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. * `sourceUrl` {string} Specifies the source url used in the source map. * Returns: {string} The code with type annotations stripped. - `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It - can be used to strip type annotations from TypeScript code before running it - with `vm.runInContext()` or `vm.compileFunction()`. - By default, it will throw an error if the code contains TypeScript features - that require transformation such as `Enums`, - see [type-stripping][] for more information. + +`module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It +can be used to strip type annotations from TypeScript code before running it +with `vm.runInContext()` or `vm.compileFunction()`. + +By default, it will throw an error if the code contains TypeScript features +that require transformation, such as `enum`s. See [type-stripping][] for more information. _WARNING_: The output of this function should not be considered stable across Node.js versions, due to changes in the TypeScript parser.