|
elementErrorComponent?: ComponentType<ErrorProps>; |
elementErrorComponent?: ComponentType<ErrorProps>;
errorScreen?: ComponentType<ErrorProps>;
-> this uses the same ErrorProps type definition as errorScreen but they actually have separate Props definitions. Causes Typescript to complain if you override with a custom load-element error component. Resolved by the following change to import the right type with a suitable alias and swap it in to the type definitions:
+ --> import type { Props as ElementErrorProps } from 'hyperview/src/core/components/load-element-error';
import type { Props as LoadingProps } from 'hyperview/src/core/components/loading';
...
--> elementErrorComponent?: ComponentType<ElementErrorProps>;
errorScreen?: ComponentType<ErrorProps>;
I'll raise a PR for it as and when I get a minute free, unless anyone else gets to it first. Any preference on target branch?
hyperview/src/core/components/hv-root/types.ts
Line 34 in 5469703
-> this uses the same
ErrorPropstype definition aserrorScreenbut they actually have separatePropsdefinitions. Causes Typescript to complain if you override with a custom load-element error component. Resolved by the following change to import the right type with a suitable alias and swap it in to the type definitions:I'll raise a PR for it as and when I get a minute free, unless anyone else gets to it first. Any preference on target branch?