mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
24 lines
383 B
TypeScript
24 lines
383 B
TypeScript
// @jsx: preserve
|
|
|
|
declare namespace JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
div: {
|
|
text?: string;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// didn't work
|
|
<div>{() => <div text="wat" />}</div>;
|
|
|
|
// didn't work
|
|
<div>{x => <div text="wat" />}</div>;
|
|
|
|
// worked
|
|
<div>{() => (<div text="wat" />)}</div>;
|
|
|
|
// worked (!)
|
|
<div>{() => <div text="wat"></div>}</div>;
|