import { forwardRef, PureComponent, PropsWithoutRef, RefAttributes, ForwardRefExoticComponent, ComponentType, } from "react"; import { Consumer } from "./context"; export type CesiumProp = { cesium: C; }; export interface CesiumInsideComponentType extends PureComponent> { cesiumElement: E; } export type CesiumHOCComponentType = ForwardRefExoticComponent< PropsWithoutRef

& RefAttributes> >; export type WithContextProps = P & CesiumProp; export type WithContextType = ComponentType>; export const withCesium = (Component: WithContextType) => // supports both functional components and class components // eslint-disable-next-line react/display-name forwardRef, P>((props, ref) => ( {(value: any) => } ));