@types/react-relay
Advanced tools
Comparing version 1.3.6 to 1.3.7
@@ -8,4 +8,5 @@ // Type definitions for react-relay 1.3 | ||
// Cameron Knight <https://github.com/ckknight> | ||
// Kaare Hoff Skovgaard <https://github.com/kastermester> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.6 | ||
// TypeScript Version: 2.8 | ||
@@ -27,8 +28,8 @@ export { | ||
// Taken from https://github.com/pelotom/type-zoo | ||
// tslint:disable-next-line:strict-export-declare-modifiers | ||
type Omit<T, K extends keyof T> = Pick<T, ({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never, [x: number]: never })[keyof T]>; | ||
export type FragmentOrRegularProp<T> = T extends { ' $refType': infer U } ? { ' $fragmentRefs': U } : T; | ||
export type RemoveRelayProp<P> = Omit<P & { relay: never }, "relay">; | ||
export type MappedFragmentProps<T> = { [K in keyof T]: FragmentOrRegularProp<T[K]> }; | ||
export type RemoveRelayProp<P> = Pick<P, Exclude<keyof P, "relay">>; | ||
export interface ComponentRef { | ||
@@ -38,3 +39,3 @@ componentRef?: (ref: any) => void; | ||
export type RelayContainer<T> = React.ComponentType<RemoveRelayProp<T> & ComponentRef>; | ||
export type RelayContainer<P> = React.ComponentType<MappedFragmentProps<RemoveRelayProp<P>> & ComponentRef>; | ||
@@ -102,6 +103,7 @@ // ~~~~~~~~~~~~~~~~~~~~~ | ||
// ~~~~~~~~~~~~~~~~~~~~~ | ||
export function createFragmentContainer<T>( | ||
Component: React.ComponentType<T>, | ||
export function createFragmentContainer<P>( | ||
Component: React.ComponentType<P>, | ||
fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap | ||
): RelayContainer<T>; | ||
): RelayContainer<P>; | ||
@@ -150,7 +152,7 @@ // ~~~~~~~~~~~~~~~~~~~~~ | ||
} | ||
export function createPaginationContainer<T>( | ||
Component: React.ComponentType<T>, | ||
export function createPaginationContainer<P>( | ||
Component: React.ComponentType<P>, | ||
fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, | ||
connectionConfig: ConnectionConfig<T> | ||
): RelayContainer<T>; | ||
connectionConfig: ConnectionConfig<P> | ||
): RelayContainer<P>; | ||
@@ -174,6 +176,6 @@ // ~~~~~~~~~~~~~~~~~~~~~ | ||
}; | ||
export function createRefetchContainer<T>( | ||
Component: React.ComponentType<T>, | ||
export function createRefetchContainer<P>( | ||
Component: React.ComponentType<P>, | ||
fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, | ||
taggedNode: RelayRuntimeTypes.GraphQLTaggedNode | ||
): RelayContainer<T>; | ||
): RelayContainer<P>; |
{ | ||
"name": "@types/react-relay", | ||
"version": "1.3.6", | ||
"version": "1.3.7", | ||
"description": "TypeScript definitions for react-relay", | ||
@@ -31,2 +31,7 @@ "license": "MIT", | ||
"githubUsername": "ckknight" | ||
}, | ||
{ | ||
"name": "Kaare Hoff Skovgaard", | ||
"url": "https://github.com/kastermester", | ||
"githubUsername": "kastermester" | ||
} | ||
@@ -37,3 +42,3 @@ ], | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
}, | ||
@@ -45,4 +50,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "85c0700583d1a5cb9603e66f9bd42f8f1b72c41ad3f52196d193fbf9ddb5e00d", | ||
"typeScriptVersion": "2.6" | ||
"typesPublisherContentHash": "e7042f39eab88436e96500a95dd73472ec4d8cd5d4f12f2201ad85311e5f3400", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/react-relay | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-relay | ||
Additional Details | ||
* Last updated: Wed, 23 May 2018 23:09:40 GMT | ||
* Last updated: Mon, 06 Aug 2018 21:55:29 GMT | ||
* Dependencies: relay-runtime, react | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Johannes Schickling <https://github.com/graphcool>, Matt Martin <https://github.com/voxmatt>, Eloy Durán <https://github.com/alloy>, Nicolas Pirotte <https://github.com/npirotte>, Cameron Knight <https://github.com/ckknight>. | ||
These definitions were written by Johannes Schickling <https://github.com/graphcool>, Matt Martin <https://github.com/voxmatt>, Eloy Durán <https://github.com/alloy>, Nicolas Pirotte <https://github.com/npirotte>, Cameron Knight <https://github.com/ckknight>, Kaare Hoff Skovgaard <https://github.com/kastermester>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19935