Closed
Description
{/** foo */
// bar
let x = 3;
}
The "foo" comment is dropped: http://www.typescriptlang.org/Playground#src=%7B%2F**%20foo%20*%2F%0A%20%20%2F%2F%20bar%0A%20%20let%20x%20%3D%203%3B%0A%7D%0A
Inserting a newline before it preserves the comment:
http://www.typescriptlang.org/Playground#src=%7B%0A%09%2F**%20foo%20*%2F%0A%20%20%2F%2F%20bar%0A%20%20let%20x%20%3D%203%3B%0A%7D%0A
var x = /** foo */ () => 12;
The "foo" comment is dropped:
http://www.typescriptlang.org/Playground#src=var%20x%20%3D%20%2F**%20foo%20*%2F%20()%20%3D%3E%2012%3B
Inserting a newline before the /**
causes it to be emitted twice(!):
http://www.typescriptlang.org/Playground#src=var%20x%20%3D%0A%2F**%20foo%20*%2F%20()%20%3D%3E%2012%3B