Skip to content

Commit

Permalink
Add PreloadPropsOf type
Browse files Browse the repository at this point in the history
Reviewed By: josephsavona

Differential Revision: D22391660

fbshipit-source-id: 9a9f33610168183e46f053000a5da21691c31c70
  • Loading branch information
rbalicki2 authored and facebook-github-bot committed Jul 6, 2020
1 parent f1f784f commit 796950e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/relay-experimental/EntryPointTypes.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,13 @@ export type EntryPoint<
$PropertyType<ElementConfig<TEntryPointComponent>, 'extraProps'>,
>;

type ExtractFirstParam = <P, R>((P) => R) => P;
type GetPreloadPropsType<T> = $ElementType<T, 'getPreloadProps'>;
export type PreloadParamsOf<T> = $Call<
ExtractFirstParam,
GetPreloadPropsType<T>,
>;

export type IEnvironmentProvider<TOptions> = {|
getEnvironment(options: ?TOptions): IEnvironment,
|};

0 comments on commit 796950e

Please sign in to comment.