Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Fix Redux Store flow type arguments to prevent the flow error `^^^^^ …
Browse files Browse the repository at this point in the history
…Store. Application of polymorphic type needs <list of 2 arguments>.`. This fix is basically adding inferred types (`*`) as arguments to all references to the Redux `Store` flow type inside of `index.js.flow`. This should fix #898. (#975)
  • Loading branch information
richardgirges authored and James Baxley committed Aug 13, 2017
1 parent 2de6715 commit 83a74ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ export { gql, compose };
declare type StatelessComponent<P> = (props: P) => ?React$Element<any>;

export interface ProviderProps {
store?: Store<any>,
store?: Store<*, *>,
client: ApolloClient,
}

declare export class ApolloProvider extends React$Component {
props: ProviderProps,
childContextTypes: {
store: Store,
store: Store<*, *>,
client: ApolloClient,
},
contextTypes: {
store: Store,
store: Store<*, *>,
},
getChildContext(): {
store: Store,
store: Store<*, *>,
client: ApolloClient,
},
render(): React$Element<*>,
Expand Down Expand Up @@ -100,7 +100,7 @@ export interface OptionProps<TProps, TResult> {
export type OptionDescription<P> = (props: P) => QueryOpts | MutationOpts;

export type NamedProps<P, R> = P & {
ownProps: R;
ownProps: R,
};

export interface OperationOption<TProps: {}, TResult: {}> {
Expand Down Expand Up @@ -146,7 +146,7 @@ declare export function parser(document: DocumentNode): IDocumentDefinition;

export interface Context {
client?: ApolloClient,
store?: Store,
store?: Store<*, *>,
[key: string]: any,
}

Expand Down

0 comments on commit 83a74ed

Please sign in to comment.