Skip to content

Commit 6ea50a6

Browse files
committed
fix state type incompatibility in javivelasco#39
1 parent e0f53dc commit 6ea50a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ declare module "react-css-themr" {
2727
new(props?: P, context?: any): ThemedComponent<P, S>;
2828
}
2929

30-
type TThemrDecorator = <P, S>(component: React.ComponentClass<P> | React.SFC<P>) => ThemedComponentClass<P, S>;
30+
interface IThemrDecorator {
31+
<P, S>(component: React.ComponentClass<P> | React.SFC<P>): ThemedComponentClass<P, S>,
32+
<P, S>(component: new(props?: P, context?: any) => React.Component<P, S>): ThemedComponentClass<P, S>
33+
}
3134

3235
export function themr(identifier: string | number | symbol,
3336
defaultTheme?: {},
34-
options?: IThemrOptions): TThemrDecorator;
37+
options?: IThemrOptions): IThemrDecorator;
3538
}

0 commit comments

Comments
 (0)