Skip to content

Commit 9c06fb9

Browse files
satya164souhe
authored andcommitted
fix: fix new flow errors in flow .78 (#29)
1 parent 2f3d5ee commit 9c06fb9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/createWithTheme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { ThemeProviderType } from './createThemeProvider';
1313
const isClassComponent = (Component: any) =>
1414
Boolean(Component.prototype && Component.prototype.isReactComponent);
1515

16-
export type WithThemeType<T, S> = <C: React.ComponentType<*>>(
16+
export type WithThemeType<T, S> = <P, C: React.ComponentType<P>>(
1717
Comp: C
1818
) => C &
1919
React.ComponentType<

src/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export function copyRefs<Props>(
3131
TargetComponent: React.ComponentType<Props>,
3232
SourceComponent: React.ComponentType<Props>
3333
): React.ComponentType<Props> {
34+
// $FlowFixMe
3435
if (!SourceComponent.prototype) {
3536
return TargetComponent;
3637
}

0 commit comments

Comments
 (0)