TypeStat icon indicating copy to clipboard operation
TypeStat copied to clipboard

Allow preferences for using React.FC or props interfaces

Open JoshuaKGoldberg opened this issue 6 years ago • 0 comments

Given this React component:

const MyComponent = ({ greeting, name }) =>
    return `${greeting}, ${name}!`;

Should the MyComponentProps be added as...

  • { greeting, name }: My ComponentProps
  • MyComponent: React.FC<MyComponentProps>

Following #170, there should be a configuration within incompleteTypes to allow one or the other. This will necessitate making the fixes.incompleteTypes allow a complex object in addition to a boolean.

JoshuaKGoldberg avatar Apr 15 '19 15:04 JoshuaKGoldberg