Accept baselines, I guess

This commit is contained in:
Andrew Branch
2019-05-21 15:39:07 -07:00
parent 2856aabd70
commit 52894cf850
10 changed files with 33 additions and 44 deletions
@@ -28,18 +28,21 @@ var foo = /** @class */ (function () {
return foo;
}());
var x;
x = <any> {test} <any></any> };
x = <any> {test}: <any></any> };
x = <any><any></any>;
x = <foo>hello {<foo>} </foo>}
x = <foo>hello {<foo>} </foo>};
x = <foo test={<foo>}>hello</foo>}/>
x = <foo test={<foo>}>hello{<foo>}</foo>}
x = <foo test={<foo>}>hello{<foo>}</foo>};
x = <foo>x</foo>, x = <foo />;
<foo>{<foo><foo>{/foo/.test(x) ? <foo><foo></foo> : <foo><foo></foo>}</foo>}</foo>
:
}</></>}</></>}/></></></>;
}
</></>}</></>}/></></></>;
@@ -123,7 +123,7 @@ var x = <div>one</div>, <div>two</div>;
var x = <div>one</div> /* intervening comment */, /* intervening comment */ <div>two</div>;
;
//// [20.jsx]
<a>{"str"}}</a>;
<a>{"str"};}</a>;
//// [21.jsx]
<span className="a" id="b"/>;
//// [22.jsx]
@@ -1,9 +1,8 @@
tests/cases/conformance/jsx/file.tsx(11,36): error TS1005: '}' expected.
tests/cases/conformance/jsx/file.tsx(11,44): error TS1003: Identifier expected.
tests/cases/conformance/jsx/file.tsx(11,46): error TS1161: Unterminated regular expression literal.
tests/cases/conformance/jsx/file.tsx(11,30): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/conformance/jsx/file.tsx(11,30): error TS18007: JSX expressions may not use the comma operator. Did you mean to write an array?
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -15,10 +14,8 @@ tests/cases/conformance/jsx/file.tsx(11,46): error TS1161: Unterminated regular
const class1 = "foo";
const class2 = "bar";
const elem = <div className={class1, class2}/>;
~
!!! error TS1005: '}' expected.
~
!!! error TS1003: Identifier expected.
!!! error TS1161: Unterminated regular expression literal.
~~~~~~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
~~~~~~~~~~~~~~
!!! error TS18007: JSX expressions may not use the comma operator. Did you mean to write an array?
@@ -16,5 +16,4 @@ const elem = <div className={class1, class2}/>;
// This should be a parse error
var class1 = "foo";
var class2 = "bar";
var elem = <div className={class1} class2/>;
/>;;
var elem = <div className={class1, class2}/>;
@@ -25,5 +25,5 @@ const elem = <div className={class1, class2}/>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>className : Symbol(className, Decl(file.tsx, 10, 17))
>class1 : Symbol(class1, Decl(file.tsx, 8, 5))
>class2 : Symbol(class2, Decl(file.tsx, 10, 36))
>class2 : Symbol(class2, Decl(file.tsx, 9, 5))
@@ -18,10 +18,10 @@ const class2 = "bar";
const elem = <div className={class1, class2}/>;
>elem : JSX.Element
><div className={class1, class2 : JSX.Element
><div className={class1, class2}/> : JSX.Element
>div : any
>className : string
>class1, class2 : "bar"
>class1 : "foo"
>class2 : true
>/>; : RegExp
>class2 : "bar"
@@ -1,26 +1,14 @@
tests/cases/conformance/jsx/file.tsx(4,11): error TS17008: JSX element 'div' has no corresponding closing tag.
tests/cases/conformance/jsx/file.tsx(4,19): error TS1109: Expression expected.
tests/cases/conformance/jsx/file.tsx(7,11): error TS2304: Cannot find name 'a'.
tests/cases/conformance/jsx/file.tsx(7,12): error TS1005: '}' expected.
tests/cases/conformance/jsx/file.tsx(8,1): error TS1005: '</' expected.
==== tests/cases/conformance/jsx/file.tsx (5 errors) ====
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
declare namespace JSX { interface Element { } }
function foo() {
var x = <div> { </div>
~~~
!!! error TS17008: JSX element 'div' has no corresponding closing tag.
~~
!!! error TS1109: Expression expected.
}
// Shouldn't see any errors down here
var y = { a: 1 };
~
!!! error TS2304: Cannot find name 'a'.
~
!!! error TS1005: '}' expected.
!!! error TS1005: '</' expected.
@@ -10,9 +10,7 @@ var y = { a: 1 };
//// [file.jsx]
function foo() {
var x = <div> {}div>
}
// Shouldn't see any errors down here
var y = {a} 1 };
</>;
var x = <div> {} </div>;
}
// Shouldn't see any errors down here
var y = { a: 1 };
@@ -11,4 +11,6 @@ function foo() {
}
// Shouldn't see any errors down here
var y = { a: 1 };
>y : Symbol(y, Decl(file.tsx, 6, 3))
>a : Symbol(a, Decl(file.tsx, 6, 9))
@@ -6,13 +6,15 @@ function foo() {
var x = <div> { </div>
>x : JSX.Element
><div> { </div>}// Shouldn't see any errors down herevar y = { a: 1 }; : JSX.Element
><div> { </div> : JSX.Element
>div : any
> : any
>div : any
}
// Shouldn't see any errors down here
var y = { a: 1 };
>a : any
> : any
>y : { a: number; }
>{ a: 1 } : { a: number; }
>a : number
>1 : 1