( // 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 )
| 286 | * function), and combines it with another value to create a final result. |
| 287 | */ |
| 288 | export function composeRenderProps<T, U, V extends T>( |
| 289 | // https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage |
| 290 | value: T extends any ? T | ((renderProps: U) => V) : never, |
| 291 | wrap: (prevValue: T, renderProps: U) => V |
| 292 | ): (renderProps: U) => V { |
| 293 | return renderProps => wrap(typeof value === 'function' ? value(renderProps) : value, renderProps); |
| 294 | } |
| 295 | |
| 296 | export type WithRef<T, E> = T & {ref?: ForwardedRef<E>}; |
| 297 | export interface SlotProps { |
no test coverage detected