With the following example, typescript throws the following error abot
Types of property 'showLoadingAnimation' are incompatible.
Type 'true' is not assignable to type 'undefined'.ts(2322)
I was checking the typings file and noticed the showLoadingAnimation prop type on one of the main exported unions types is undefined.
declare type CustomPlaceholderProps = CommonProps & {
/** pass any renderable content to be used as placeholder instead of the built-in ones */
customPlaceholder?: React.ReactElement<{
[k: string]: any;
}> | null;
type?: undefined;
rows?: undefined;
color?: undefined;
showLoadingAnimation?: undefined;
};
I would expect this to be a boolean. The optional flag already defines that it can be undefined. When I edit it in node_modules, it behaves as expect on my machine and no longer throws the error.
Really like this library, but I found an incorrect type that is preventing me from using the showLoadingAnimation prop.
With the following example, typescript throws the following error abot
I was checking the typings file and noticed the showLoadingAnimation prop type on one of the main exported unions types is undefined.
I would expect this to be a boolean. The optional flag already defines that it can be undefined. When I edit it in node_modules, it behaves as expect on my machine and no longer throws the error.
Suggested fix:
I'll open a pull request from this, I'd really like to use this library for my project but a main feature that I like is the animation