File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
tests/baselines/reference Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ tests/cases/conformance/jsx/file.tsx(9,14): error TS2322: Type 'number' is not assignable to type 'string'.
2
+
3
+
4
+ ==== tests/cases/conformance/jsx/react.d.ts (0 errors) ====
5
+
6
+ declare module JSX {
7
+ interface Element { }
8
+ interface IntrinsicElements {
9
+ }
10
+ interface ElementAttributesProperty {
11
+ props;
12
+ }
13
+ }
14
+
15
+ interface Props {
16
+ foo: string;
17
+ }
18
+
19
+ ==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
20
+ export class MyComponent {
21
+ render() {
22
+ }
23
+
24
+ props: { foo: string; }
25
+ }
26
+
27
+ <MyComponent foo="bar" />; // ok
28
+ <MyComponent foo={0} />; // should be an error
29
+ ~~~~~~~
30
+ !!! error TS2322: Type 'number' is not assignable to type 'string'.
31
+
You can’t perform that action at this time.
0 commit comments