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