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