TypeScript/tests/baselines/reference/commentEmittingInPreserveJsx1.js
Wesley Wigham c3ff0d4c17
Under jsx: preserve, actually preserve expressions which contain only comments (#41757)
* Under jsx: preserve, actually preserve expressions which contain only comments

* Even better best effort comment preservation in JSX comments
2020-12-18 11:42:33 -08:00

60 lines
798 B
TypeScript

//// [file.tsx]
import React = require('react');
<div>
// Not Comment
</div>;
<div>
// Not Comment
{
//Comment just Fine
}
// Another not Comment
</div>;
<div>
// Not Comment
{
//Comment just Fine
"Hi"
}
// Another not Comment
</div>;
<div>
/* Not Comment */
{
//Comment just Fine
"Hi"
}
</div>;
//// [file.jsx]
"use strict";
exports.__esModule = true;
var React = require("react");
<div>
// Not Comment
</div>;
<div>
// Not Comment
{
//Comment just Fine
}
// Another not Comment
</div>;
<div>
// Not Comment
{
//Comment just Fine
"Hi"}
// Another not Comment
</div>;
<div>
/* Not Comment */
{
//Comment just Fine
"Hi"}
</div>;