diff --git a/index.d.ts b/index.d.ts index 7a4e6ec..b37454b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,17 +4,21 @@ declare module "react-css-themr" { type TReactCSSThemrTheme = { [key: string]: string | TReactCSSThemrTheme } + type TMapThemrProps

= (ownProps: P, theme: TReactCSSThemrTheme) => P & { theme: TReactCSSThemrTheme } export function themeable(...themes: Array): TReactCSSThemrTheme; export interface IThemrOptions { /** @default "deeply" */ composeTheme?: "deeply" | "softly" | false, + //currently there's no way to lift decorated component's generic type argument (P) to upper decorator + //that's why just {} + mapThemrProps?: TMapThemrProps<{}> } export interface ThemeProviderProps { innerRef?: Function, - theme: {} + theme: TReactCSSThemrTheme } export class ThemeProvider extends React.Component { @@ -31,5 +35,6 @@ declare module "react-css-themr" { identifier: string | number | symbol, defaultTheme?: {}, options?: IThemrOptions - ): (component: (new(props?: P, context?: any) => React.Component) | React.SFC

) => ThemedComponentClass; + ): (component: (new(props?: P, context?: any) => React.Component) | React.SFC

) => + ThemedComponentClass

}, S>; }