mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
24 lines
727 B
TypeScript
24 lines
727 B
TypeScript
//@filename: file.tsx
|
|
//@jsx: react
|
|
declare module JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
[s: string]: any;
|
|
}
|
|
}
|
|
declare var React: any;
|
|
|
|
<div>Dot goes here: · ¬AnEntity; </div>;
|
|
<div>Be careful of "-ed strings!</div>;
|
|
<div>{{braces}}</div>;
|
|
// Escapes do nothing
|
|
<div>\n</div>;
|
|
|
|
// Also works in string literal attributes
|
|
<div attr="{…}\"></div>;
|
|
// Does not happen for a string literal that happens to be inside an attribute (and escapes then work)
|
|
<div attr={"{…}\""}></div>;
|
|
// Preserves single quotes
|
|
<div attr='"'></div>;
|
|
// https://github.com/microsoft/TypeScript/issues/35732
|
|
<div>🐈🐕🐇🐑</div>; |