renderProp.d.ts 472 B

12345678
  1. import * as React from 'react';
  2. import { SideCarHOC } from './types';
  3. declare type CombinedProps<T extends any[], K> = {
  4. children: (...prop: T) => any;
  5. } & K;
  6. declare type RenderPropComponent<T extends any[], K> = React.ComponentType<CombinedProps<T, K>>;
  7. export declare function renderCar<T extends any[], K, C = RenderPropComponent<T, K & Partial<SideCarHOC>>>(WrappedComponent: C, defaults: (props: K) => T): (props: CombinedProps<T, K>) => JSX.Element;
  8. export {};