Skip to content

Commit c1c4143

Browse files
committed
[Tests] prop-types: add passing test
Closes #2971
1 parent 2cca260 commit c1c4143

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/lib/rules/prop-types.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3966,6 +3966,26 @@ ruleTester.run('prop-types', rule, {
39663966
activeProject: projectType,
39673967
};
39683968
`,
3969+
},
3970+
{
3971+
code: `
3972+
import React from 'react';
3973+
3974+
interface SomeType<ContextType = any> {
3975+
renderValue: (context: ContextType) => React.ReactNode;
3976+
}
3977+
3978+
interface DataObject {
3979+
id: string,
3980+
title: string,
3981+
value: string,
3982+
}
3983+
3984+
const someType: SomeType<DataObject> = {
3985+
renderValue: ({title}) => <div>{title}</div>,
3986+
};
3987+
`,
3988+
features: ['types'],
39693989
}
39703990
)),
39713991

0 commit comments

Comments
 (0)