import { ComponentType, FunctionComponent } from "react"; import { Hoc } from "../types/Hoc"; export type NewHocReturn = (...args: HocArgs) => Hoc; export type HocDefinition = (Component: ComponentType, ...args: HocArgs) => FunctionComponent; export type GetHocArgs = Extract ? R : T extends HocDefinition ? R : never, any[]>; type Name = string | ((functions: { Component: ComponentType; hoc: HocDefinition; }, ...args: HocArgs) => string); declare function newHoc>(hoc: HocDefinition>): TNewHocReturn; declare function newHoc>(name: Name>, hoc: HocDefinition>): TNewHocReturn; declare const exportNewHoc: typeof newHoc; export { exportNewHoc as newHoc }; //# sourceMappingURL=newHoc.d.ts.map