-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Milestone
Description
Bug Report
TypeScript removes comments when transpiling even when removeComments: false
.
π Search Terms
removeComments; comments;
π Version & Regression Information
Seems to happen on all versions (at least from 3.x to latest).
β― Playground Link
π» Code
Specifying a type on b
causes the problem to manifest,
let a = /*[[${something}]]*/ {};
let b: any = /*[[${something}]]*/ {};
π Actual behavior
Produces the following output when removeComments
is set to false
on tsconfig.json:
"use strict";
let a = /*[[${something}]]*/ {};
let b = {};
π Expected behavior
Should keep the comments on both lines:
"use strict";
let a = /*[[${something}]]*/ {};
let b = /*[[${something}]]*/ {};