mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +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) => {}} />
|
|
</>
|
|
);
|
|
}; |