{ [P in Exclude<keyof T, keyof U>]: T[P] }; // HoCs declare function connect<P extends {}>(c: ComponentType<P>): ComponentType<$Diff<P, { count: number }>>; declare function withRouter<P extends {}>(c: ComponentType<P>): ComponentType<$Diff<P, { location: Location }>>; type Props = { className: string, location: Location, count: number, }; declare function MyComponent(props: Props): JSX.Element; // render props component const enhancer = compose( connect, withRouter, ); const MyContainer = enhancer(MyComponent); const App = () => <MyContainer className="app" />; // Outer Props͕ਪ͞ΕΔ