| 49 | > |
| 50 | |
| 51 | export interface ComponentWithAs<ComponentType extends As, ComponentProps> { |
| 52 | // These types are a bit of a hack, but cover us in cases where the `as` prop |
| 53 | // is not a JSX string type. Makes the compiler happy so 🤷♂️ |
| 54 | <TT extends As>(props: PropsWithAs<TT, ComponentProps>): React.ReactElement | null |
| 55 | (props: PropsWithAs<ComponentType, ComponentProps>): React.ReactElement | null |
| 56 | |
| 57 | displayName?: string |
| 58 | propTypes?: React.WeakValidationMap<PropsWithAs<ComponentType, ComponentProps>> |
| 59 | contextTypes?: React.ValidationMap<any> |
| 60 | defaultProps?: Partial<PropsWithAs<ComponentType, ComponentProps>> |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * This is a hack for sure. The thing is, getting a component to intelligently |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…