export {}; interface ThemeWithProps { props?: { [K in keyof Components]: Partial }; } type ThemedProps = Theme extends { props: Record } ? Props : {}; export default function getThemeProps< Theme extends ThemeWithProps, Props, Name extends keyof any >(params: { props: Props; name: Name; theme?: Theme }): Props & ThemedProps;