( // https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage value: T extends any ? T | ((renderProps: U) => V) : never, wrap: (prevValue: T, renderProps: U) => V )
| 271 | * function), and combines it with another value to create a final result. |
| 272 | */ |
| 273 | export function composeRenderProps<T, U, V extends T>( |
| 274 | // https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage |
| 275 | value: T extends any ? T | ((renderProps: U) => V) : never, |
| 276 | wrap: (prevValue: T, renderProps: U) => V |
| 277 | ): (renderProps: U) => V { |
| 278 | return renderProps => wrap(typeof value === 'function' ? value(renderProps) : value, renderProps); |
| 279 | } |
| 280 | |
| 281 | export type WithRef<T, E> = T & {ref?: ForwardedRef<E>}; |
| 282 | export interface SlotProps { |
no test coverage detected