UNPKG

ab-test-jsx

Version:
11 lines (10 loc) 546 B
import * as React from 'react'; import { ABTests } from '../ABTestsContext'; declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; export declare type withABTestsHoC<T extends ABTests> = <TProps extends { abTests: T; }>(Component: React.ComponentType<TProps>) => React.FC<Omit<TProps, 'abTests'>>; declare const withABTests: <TProps extends { abTests: TABTests; }, TABTests extends ABTests>(Component: React.ComponentType<TProps>) => React.FC<Pick<TProps, Exclude<keyof TProps, "abTests">>>; export default withABTests;