| 67 | >; |
| 68 | |
| 69 | export interface ComponentWithAs<ComponentType extends As, ComponentProps> { |
| 70 | // These types are a bit of a hack, but cover us in cases where the `as` prop |
| 71 | // is not a JSX string type. Makes the compiler happy so 🤷♂️ |
| 72 | <TT extends As>( |
| 73 | props: PropsWithAs<TT, ComponentProps> |
| 74 | ): React.ReactElement | null; |
| 75 | ( |
| 76 | props: PropsWithAs<ComponentType, ComponentProps> |
| 77 | ): React.ReactElement | null; |
| 78 | |
| 79 | displayName?: string; |
| 80 | propTypes?: ValidationMap<React.ReactNode>; |
| 81 | contextTypes?: ValidationMap<React.ReactNode>; |
| 82 | defaultProps?: Partial<PropsWithAs<ComponentType, ComponentProps>>; |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * 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