TypeScript/tests/cases/conformance/jsx/jsxParsingError1.tsx
Ryan Cavanaugh 51c547428b Parse JSX attributes as AssignmentExpressions
We should issue an error when parsing `<div x={1, 2} />` as the comma operator is not a legal production in a JSX Expression

Fixes (mitigates?) bug #5991
2015-12-08 09:53:47 -08:00

15 lines
279 B
TypeScript

//@jsx: preserve
//@filename: file.tsx
declare module JSX {
interface Element { }
interface IntrinsicElements {
[s: string]: any;
}
}
// This should be a parse error
const class1 = "foo";
const class2 = "bar";
const elem = <div className={class1, class2}/>;