Convert HTML entities to strings (#4125)

This commit is contained in:
Ryan Cavanaugh
2015-08-20 12:20:28 -07:00
parent dc5885d40e
commit 67f81bc53c
5 changed files with 336 additions and 4 deletions

View File

@@ -0,0 +1,14 @@
//// [tsxReactEmitEntities.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
[s: string]: any;
}
}
declare var React: any;
<div>Dot goes here: &middot; </div>;
//// [tsxReactEmitEntities.js]
React.createElement("div", null, "Dot goes here: · ");

View File

@@ -0,0 +1,21 @@
=== tests/cases/conformance/jsx/tsxReactEmitEntities.tsx ===
declare module JSX {
>JSX : Symbol(JSX, Decl(tsxReactEmitEntities.tsx, 0, 0))
interface Element { }
>Element : Symbol(Element, Decl(tsxReactEmitEntities.tsx, 0, 20))
interface IntrinsicElements {
>IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22))
[s: string]: any;
>s : Symbol(s, Decl(tsxReactEmitEntities.tsx, 3, 3))
}
}
declare var React: any;
>React : Symbol(React, Decl(tsxReactEmitEntities.tsx, 6, 11))
<div>Dot goes here: &middot; </div>;
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22))
>div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22))

View File

@@ -0,0 +1,22 @@
=== tests/cases/conformance/jsx/tsxReactEmitEntities.tsx ===
declare module JSX {
>JSX : any
interface Element { }
>Element : Element
interface IntrinsicElements {
>IntrinsicElements : IntrinsicElements
[s: string]: any;
>s : string
}
}
declare var React: any;
>React : any
<div>Dot goes here: &middot; </div>;
><div>Dot goes here: &middot; </div> : JSX.Element
>div : any
>div : any