Skip to content

Commit

Permalink
Strictify EntryPoint typing by making TPreloadParams invariant
Browse files Browse the repository at this point in the history
Reviewed By: voideanvalue

Differential Revision: D45872706

fbshipit-source-id: a620a6480695cd39571ab1efdee41944c690b587
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed May 18, 2023
1 parent 4b1b59e commit 9b7e157
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-relay/relay-hooks/EntryPointTypes.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ TExtraProps - a bag of extra props that you may define in `entrypoint` file
and they will be passed to the EntryPointComponent as `extraProps`
*/
type InternalEntryPointRepresentation<
+TEntryPointParams,
TEntryPointParams,
TPreloadedQueries,
TPreloadedEntryPoints,
TRuntimeProps,
Expand Down Expand Up @@ -212,7 +212,7 @@ export type PreloadedEntryPoint<TEntryPointComponent> = $ReadOnly<{
}>;

type _ComponentFromEntryPoint = <
+TPreloadParams,
TPreloadParams,
+TComponent,
+TEntryPoint: EntryPoint<TPreloadParams, TComponent>,
>(
Expand Down Expand Up @@ -257,7 +257,7 @@ export type ExtractEntryPointTypeHelper = <
EntryPoint<TEntryPointParams, TEntryPointComponent>,
>;

export type EntryPoint<+TEntryPointParams, +TEntryPointComponent> =
export type EntryPoint<TEntryPointParams, +TEntryPointComponent> =
InternalEntryPointRepresentation<
TEntryPointParams,
ElementConfig<TEntryPointComponent>['queries'],
Expand Down

0 comments on commit 9b7e157

Please sign in to comment.