Closed
Description
I'm using TSX without React. I'm just wondering how do I get type checking for a non-intrinsic element?
<ScrollableContent class='CommentsListContainer' type='vertical' maxHeight={300}/>
the attributes class
, type
and maxHeight
is of type any. I have tried numerous ways to get type checking, but failed. I have also looked at react.d.ts
to try to get the solution, but also failed.
The ScrollableContent
class is an extension of a generic class:
interface Props {
class: string;
maxLength: number;
type: 'vertical' | 'horizontal';
}
export class ScrollableContent extends Component<Props> {
And I guess just the right interfaces need to be defined in the JSX namespace in order for everything to kick in?