// @strict: true
// @jsx: react-jsx
// @noEmit: true
///
// repro from #52798
type A = {
a: boolean;
};
type B = {
b: string;
};
type C = {
c: number;
};
type Animations = {
[key: string]: { value: number } & (
| ({ kind: "a"; func?(): Partial } & A)
| ({ kind: "b"; func?(): Partial } & B)
| ({ kind: "c"; func?(): Partial } & C)
);
};
type StyleParam = Record;
type AnimatedViewProps = {
style: (animationsValues: StyleParam) => string;
animations: T;
};
const Component = ({
animations,
style,
}: AnimatedViewProps) => <>>;
{
return "";
}}
/>;
{
return "";
}}
/>;
{
return {
a: true,
};
},
},
}}
style={(anim) => {
return "";
}}
/>;
// repro from #52786
interface Props {
a: (x: string) => T;
b: (arg: T) => void;
}
function Foo(props: Props) {
return ;
}
10}
b={(arg) => { arg.toString(); }}
/>;
10}
b={(arg) => { arg.toString(); }}
/>;
10,
b: (arg) => { arg.toString(); },
}} />;