[relay] Expose componentRef prop of containers.

This commit is contained in:
Eloy Durán
2018-02-06 15:52:51 +01:00
parent 26b18f911e
commit cda26c85c2

View File

@@ -92,7 +92,7 @@ export class QueryRenderer extends ReactRelayQueryRenderer {}
export function createFragmentContainer<T>(
Component: React.ComponentType<T>,
fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap
): React.ComponentType<RemoveRelayProp<T>>;
): React.ComponentType<RemoveRelayProp<T> & { componentRef?: any }>;
// ~~~~~~~~~~~~~~~~~~~~~
// createPaginationContainer
@@ -140,7 +140,7 @@ export function createPaginationContainer<T>(
Component: React.ComponentType<T>,
fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap,
connectionConfig: ConnectionConfig<T>
): React.ComponentType<RemoveRelayProp<T>>;
): React.ComponentType<RemoveRelayProp<T> & { componentRef?: any }>;
// ~~~~~~~~~~~~~~~~~~~~~
// createRefetchContainer
@@ -163,4 +163,4 @@ export function createRefetchContainer<T>(
Component: React.ComponentType<T>,
fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap,
taggedNode: RelayRuntimeTypes.GraphQLTaggedNode
): React.ComponentType<RemoveRelayProp<T>>;
): React.ComponentType<RemoveRelayProp<T> & { componentRef?: any }>;