mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
30 lines
604 B
TypeScript
30 lines
604 B
TypeScript
// @strict: true
|
|
// @noEmit: true
|
|
// @jsx: preserve
|
|
|
|
/// <reference path="/.lib/react16.d.ts" />
|
|
|
|
// repro from #53493
|
|
|
|
import React = require('react');
|
|
|
|
export type Props =
|
|
| { renderNumber?: false; children: (arg: string) => void }
|
|
| {
|
|
renderNumber: true;
|
|
children: (arg: number) => void;
|
|
};
|
|
|
|
export declare function Foo(props: Props): JSX.Element;
|
|
|
|
export const Test = () => {
|
|
return (
|
|
<>
|
|
<Foo>{(value) => {}}</Foo>
|
|
<Foo renderNumber>{(value) => {}}</Foo>
|
|
|
|
<Foo children={(value) => {}} />
|
|
<Foo renderNumber children={(value) => {}} />
|
|
</>
|
|
);
|
|
}; |