@@ -258,16 +258,19 @@ added:
258258 will be generated for the transformed code.
259259 * ` sourceUrl` {string} Specifies the source url used in the source map.
260260* Returns: {string} The code with type annotations stripped.
261- ` module .stripTypeScriptTypes ()` removes type annotations from TypeScript code. It
262- can be used to strip type annotations from TypeScript code before running it
263- with ` vm.runInContext()` or ` vm.compileFunction()` .
264- By default, it will throw an error if the code contains TypeScript features
265- that require transformation such as ` Enums` ,
266- see [type-stripping][] for more information.
267- When mode is ` ' transform' ` , it also transforms TypeScript features to JavaScript,
268- see [transform TypeScript features][] for more information.
269- When mode is ` ' strip' ` , source maps are not generated, because locations are preserved.
270- If ` sourceMap` is provided, when mode is ` ' strip' ` , an error will be thrown.
261+
262+ ` module .stripTypeScriptTypes ()` removes type annotations from TypeScript code. It
263+ can be used to strip type annotations from TypeScript code before running it
264+ with ` vm.runInContext()` or ` vm.compileFunction()` .
265+
266+ By default, it will throw an error if the code contains TypeScript features
267+ that require transformation, such as ` enum` s. See [type-stripping][] for more information.
268+
269+ When mode is ` ' transform' ` , it also transforms TypeScript features to JavaScript.
270+ See [transform TypeScript features][] for more information.
271+
272+ When mode is ` ' strip' ` , source maps are not generated, because locations are preserved.
273+ If ` sourceMap` is provided, when mode is ` ' strip' ` , an error will be thrown.
271274
272275_WARNING_: The output of this function should not be considered stable across Node.js versions,
273276due to changes in the TypeScript parser.
0 commit comments