TypeScript: Incorrect typing of AutoSize height and width
melloware opened this issue · comments
Melloware commented
I am upgrading an old library from react-virtualized and it was doing this.
<AutoSizer
disableHeight={this.props.height !== "auto"}
disableWidth={this.props.width !== "auto"}
>
{({ height, width }) => (
When upgrading to this library its now saying height
and width
are not valid because my props are defaulted to auto
but allow the user to change.
Brian Vaughn commented
The type warnings are intentional (and correct)
Please see the recent discussion on #70
Melloware commented
Thank for the great library! I understand your design decision but something to remember.
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. - Douglas Adams