UNPKG

triviality-react

Version:

Exposes triviality service container to react components

6 lines (5 loc) 403 B
import { ComponentClass, FunctionComponent } from 'react'; export interface WithServiceContainerProps<T> { serviceContainer: T; } export declare function withServiceContainer<TOwnProps extends WithServiceContainerProps<Container>, Container>(Component: ComponentClass<TOwnProps> | FunctionComponent<TOwnProps>): (props: Pick<TOwnProps, Exclude<keyof TOwnProps, "serviceContainer">>) => JSX.Element;