(
component: React.ForwardRefRenderFunction<
React.ElementRef<Component>,
React.PropsWithoutRef<
Omit<React.ComponentPropsWithoutRef<Component>, keyof Props | "as"> &
Props & {
as?: As;
}
>
>,
)
| 29 | import { ComponentWithAs, As } from "./types"; |
| 30 | |
| 31 | export function forwardRef<Props extends object, Component extends As>( |
| 32 | component: React.ForwardRefRenderFunction< |
| 33 | React.ElementRef<Component>, |
| 34 | React.PropsWithoutRef< |
| 35 | Omit<React.ComponentPropsWithoutRef<Component>, keyof Props | "as"> & |
| 36 | Props & { |
| 37 | as?: As; |
| 38 | } |
| 39 | > |
| 40 | >, |
| 41 | ): ComponentWithAs<Component, Props> { |
| 42 | return forwardReactRef(component) as unknown as ComponentWithAs< |
| 43 | Component, |
| 44 | Props |
| 45 | >; |
| 46 | } |
no outgoing calls
no test coverage detected