I have a React Component in Typescript. This component has a State but no Properties. I have the following code:
interface State { ... }
class MyComponent extends React.Component<{}, State> { ... }
Today I moved from tslint to eslint, and got a warning, saying I should not use {} as a type.
When I created an empty interface:
interface Prop { }
And passed that as the first generic argument, I got another warning, saying an empty interface is the same as {}.
So, what should I do? I can't use never since it causes a whole bunch of other errors, please - it really doesn't make sense here. Is there any alternative to disabling the ban-types rule?