mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-26 03:19:10 -06:00
Update JSX test errors (#41602)
This commit is contained in:
parent
6b04f50394
commit
308814f6fa
@ -1,30 +1,40 @@
|
||||
tests/cases/compiler/a.jsx(1,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/a.jsx(4,1): error TS2657: JSX expressions must have one parent element.
|
||||
tests/cases/compiler/a.jsx(4,5): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/a.jsx(4,13): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
||||
tests/cases/compiler/a.jsx(4,14): error TS17002: Expected corresponding JSX closing tag for 'number'.
|
||||
tests/cases/compiler/a.jsx(4,20): error TS2657: JSX expressions must have one parent element.
|
||||
tests/cases/compiler/a.jsx(5,1): error TS2657: JSX expressions must have one parent element.
|
||||
tests/cases/compiler/a.jsx(5,5): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/a.jsx(5,6): error TS17008: JSX element 'number' has no corresponding closing tag.
|
||||
tests/cases/compiler/a.jsx(5,14): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
||||
tests/cases/compiler/a.jsx(6,1): error TS1005: '</' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/a.jsx (7 errors) ====
|
||||
==== tests/cases/compiler/a.jsx (10 errors) ====
|
||||
Foo<number>();
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
Foo<number>(1);
|
||||
Foo<number>``;
|
||||
<Foo<number>></Foo>;
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2657: JSX expressions must have one parent element.
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~
|
||||
!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
||||
~~~~~~
|
||||
!!! error TS17002: Expected corresponding JSX closing tag for 'number'.
|
||||
~
|
||||
!!! error TS2657: JSX expressions must have one parent element.
|
||||
<Foo<number>/>;
|
||||
~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~~~
|
||||
!!! error TS17008: JSX element 'number' has no corresponding closing tag.
|
||||
~
|
||||
!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
||||
|
||||
|
||||
!!! error TS2657: JSX expressions must have one parent element.
|
||||
|
||||
!!! error TS1005: '</' expected.
|
||||
@ -1,7 +1,8 @@
|
||||
tests/cases/conformance/jsx/file.jsx(4,9): error TS2695: Left side of comma operator is unused and has no side effects.
|
||||
tests/cases/conformance/jsx/file.jsx(4,9): error TS2657: JSX expressions must have one parent element.
|
||||
tests/cases/conformance/jsx/file.jsx(4,16): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/jsx/file.jsx(4,17): error TS2693: 'Prop' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/jsx/file.jsx(4,17): error TS17008: JSX element 'Prop' has no corresponding closing tag.
|
||||
tests/cases/conformance/jsx/file.jsx(4,38): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
||||
tests/cases/conformance/jsx/file.jsx(5,1): error TS1005: '</' expected.
|
||||
|
||||
|
||||
@ -16,19 +17,22 @@ tests/cases/conformance/jsx/file.jsx(5,1): error TS1005: '</' expected.
|
||||
b: string
|
||||
}
|
||||
|
||||
==== tests/cases/conformance/jsx/file.jsx (5 errors) ====
|
||||
==== tests/cases/conformance/jsx/file.jsx (6 errors) ====
|
||||
import { MyComp, Prop } from "./component";
|
||||
import * as React from "react";
|
||||
|
||||
let x = <MyComp<Prop> a={10} b="hi" />; // error, no type arguments in js
|
||||
~~~~~~~
|
||||
!!! error TS2695: Left side of comma operator is unused and has no side effects.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~
|
||||
!!! error TS2693: 'Prop' only refers to a type, but is being used as a value here.
|
||||
~~~~
|
||||
!!! error TS17008: JSX element 'Prop' has no corresponding closing tag.
|
||||
~
|
||||
!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
||||
|
||||
|
||||
!!! error TS2657: JSX expressions must have one parent element.
|
||||
|
||||
!!! error TS1005: '</' expected.
|
||||
Loading…
x
Reference in New Issue
Block a user