/** * Unwraps the decorated typings from a decorator-wrapped components to provide the original type of the underlying * component. Useful in unit testing when stubbing decorators with the identity function. */ export type UnwrapComponent = T extends React.MemoExoticComponent ? UnwrapComponent : T extends React.LazyExoticComponent ? UnwrapComponent : "WrappedComponent" extends keyof T ? UnwrapComponent : T;