import { ComponentType, FunctionComponent } from "react"; import { Fn, FromSchema, Pipe, ToSchema } from "./Fn"; export type Hoc = < Props extends {}, // without would trigger Type instantiation is excessively deep and possibly infinite Fns extends Fn[] = TFns, >( Component: ComponentType, ) => FunctionComponent< FromSchema, Fns>, [string, any]>> >;