diff --git a/typings/index.d.ts b/typings/index.d.ts index fd76d0e..9f89f3a 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -7,14 +7,15 @@ import hoistNonReactStatics = require('./hoist-non-react-statics'); type $Without = T extends any ? Pick> : never; type $DeepPartial = { [P in keyof T]?: $DeepPartial }; +export type ThemedComponent = React.ComponentType< + $Without & { theme?: $DeepPartial } +> & hoistNonReactStatics.NonReactStatics; + export type ThemingType = { ThemeProvider: React.ComponentType<{ theme?: Theme }>; withTheme: ( WrappedComponent: React.ComponentType & C - ) => React.ComponentType< - $Without & { theme?: $DeepPartial } - > & - hoistNonReactStatics.NonReactStatics; + ) => ThemedComponent useTheme(overrides?: $DeepPartial): T; };