From 7f407c876e5c01bc293493bc78004215bb0eb106 Mon Sep 17 00:00:00 2001 From: voxmatt Date: Sat, 9 Sep 2017 17:51:02 -1000 Subject: [PATCH] fixing a couple errors --- types/react-relay/index.d.ts | 2 +- types/react-relay/react-relay-tests.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/react-relay/index.d.ts b/types/react-relay/index.d.ts index de3def9a00..a165229584 100644 --- a/types/react-relay/index.d.ts +++ b/types/react-relay/index.d.ts @@ -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, diff --git a/types/react-relay/react-relay-tests.tsx b/types/react-relay/react-relay-tests.tsx index 86ec270627..2b76bc7860 100644 --- a/types/react-relay/react-relay-tests.tsx +++ b/types/react-relay/react-relay-tests.tsx @@ -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 { 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: () => {}, } }