Skip to content

Commit 3e57af1

Browse files
committed
Add missed file
1 parent 1b02232 commit 3e57af1

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+

0 commit comments

Comments
 (0)