fixing a couple errors

This commit is contained in:
voxmatt
2017-09-09 17:51:02 -10:00
parent b6a411db2a
commit 7f407c876e
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ declare namespace __Relay.Modern {
export type RelayRefetchProp = RelayProp & {
refetch: (
refetchVariables: Common.Variables | ((fragmentVariables: Common.Variables) => Common.Variables),
renderVariables: Common.Variables | void,
renderVariables?: Common.Variables,
callback?: (error: Error | void) => void,
options?: RefetchOptions,
) => Common.Disposable,
+3 -3
View File
@@ -29,7 +29,7 @@ import {
// ~~~~~~~~~~~~~~~~~~~~~
// Modern Environment
// ~~~~~~~~~~~~~~~~~~~~~
let network: __Relay.Runtime.RelayNetwork;
const network = {} as __Relay.Runtime.RelayNetwork;
const source = new RecordSource();
const store = new Store(source);
const modernEnvironment = new Environment({ network, store });
@@ -113,7 +113,7 @@ class FeedStories extends React.Component<IFeedStoriesProps, {}> {
const refetchVariables = (fragmentVariables: {count: number }) => ({
count: fragmentVariables.count + 10,
});
this.props.relay.refetch(refetchVariables, null);
this.props.relay.refetch(refetchVariables);
}
}
@@ -442,7 +442,7 @@ class StubbedArtwork extends React.Component {
setVariables: () => {},
forceFetch: () => {},
hasOptimisticUpdate: () => false,
getPendingTransactions: (): Relay.RelayMutationTransaction[] => undefined,
getPendingTransactions: (): any => undefined,
commitUpdate: () => {},
}
}