Skip to content

Commit

Permalink
[Tests] prop-types: add passing test
Browse files Browse the repository at this point in the history
Closes #2971
  • Loading branch information
ljharb committed Feb 22, 2022
1 parent 2cca260 commit c1c4143
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/lib/rules/prop-types.js
Expand Up @@ -3966,6 +3966,26 @@ ruleTester.run('prop-types', rule, {
activeProject: projectType,
};
`,
},
{
code: `
import React from 'react';
interface SomeType<ContextType = any> {
renderValue: (context: ContextType) => React.ReactNode;
}
interface DataObject {
id: string,
title: string,
value: string,
}
const someType: SomeType<DataObject> = {
renderValue: ({title}) => <div>{title}</div>,
};
`,
features: ['types'],
}
)),

Expand Down

0 comments on commit c1c4143

Please sign in to comment.