Skip to content

Commit 06bbf28

Browse files
committed
[Tests] no-unused-prop-types: add passing test
Closes #1558
1 parent 077a7d2 commit 06bbf28

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/lib/rules/no-unused-prop-types.js

+21
Original file line numberDiff line numberDiff line change
@@ -3882,6 +3882,27 @@ ruleTester.run('no-unused-prop-types', rule, {
38823882
`,
38833883
features: ['types'],
38843884
},
3885+
{
3886+
code: `
3887+
class Component extends Component <{}, {updateQueue: Array<string>}> {
3888+
debouncedUpdate = debounce((cellsetId, options) => {
3889+
this.setState((prevState, props) => {
3890+
const {updateQueue} = prevState;
3891+
const {updateCells} = props;
3892+
updateCells(cellsetId, updateQueue, options);
3893+
return {
3894+
updateQueue: [],
3895+
};
3896+
});
3897+
}, 2000);
3898+
3899+
render() {
3900+
return <div />
3901+
}
3902+
}
3903+
`,
3904+
features: ['class fields', 'types'],
3905+
},
38853906
]),
38863907

38873908
invalid: parsers.all([].concat(

0 commit comments

Comments
 (0)