Skip to content

Commit 7bb491d

Browse files
committed
[Tests] prop-types: add passing test
Closes #740
1 parent c9b7294 commit 7bb491d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/lib/rules/prop-types.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3670,6 +3670,23 @@ ruleTester.run('prop-types', rule, {
36703670
));
36713671
`,
36723672
features: ['ts', 'no-babel'],
3673+
},
3674+
{
3675+
code: `
3676+
type ButtonProps = ({
3677+
children: React.Node,
3678+
} | {
3679+
icon: React.Element,
3680+
}) & {
3681+
label: string,
3682+
disabled?: boolean
3683+
} & {};
3684+
3685+
const Button: React.FC<ButtonProps> = ({ children, icon, label, disabled }: ButtonProps) => {
3686+
return <div />;
3687+
}
3688+
`,
3689+
features: ['types'],
36733690
}
36743691
)),
36753692

0 commit comments

Comments
 (0)