react-relay 20.1.1 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReactRelayContext.js +1 -1
- package/ReactRelayContext.js.flow +2 -2
- package/ReactRelayFragmentContainer.js.flow +8 -9
- package/ReactRelayLocalQueryRenderer.js.flow +11 -3
- package/ReactRelayLoggingContext.js.flow +3 -3
- package/ReactRelayPaginationContainer.js.flow +32 -25
- package/ReactRelayQueryFetcher.js.flow +1 -1
- package/ReactRelayQueryRenderer.js.flow +2 -2
- package/ReactRelayQueryRendererContext.js.flow +2 -2
- package/ReactRelayRefetchContainer.js.flow +17 -14
- package/ReactRelayTestMocker.js.flow +10 -10
- package/ReactRelayTypes.d.ts +377 -0
- package/ReactRelayTypes.js.flow +47 -43
- package/RelayContext.js.flow +3 -3
- package/__flowtests__/ReactRelayFragmentContainer-flowtest.js.flow +11 -11
- package/__flowtests__/ReactRelayPaginationContainer-flowtest.js.flow +5 -5
- package/__flowtests__/ReactRelayRefetchContainer-flowtest.js.flow +5 -5
- package/__flowtests__/RelayModern-flowtest.js.flow +32 -32
- package/__flowtests__/RelayModernFlowtest_users.graphql.js.flow +1 -1
- package/__flowtests__/__generated__/ReactRelayFragmentContainerFlowtest_viewer.graphql.js.flow +3 -4
- package/__flowtests__/__generated__/ReactRelayFragmentContainerFlowtest_viewer2.graphql.js.flow +3 -4
- package/__flowtests__/__generated__/ReactRelayPaginationContainerFlowtestQuery.graphql.js.flow +9 -10
- package/__flowtests__/__generated__/ReactRelayPaginationContainerFlowtest_viewer.graphql.js.flow +4 -5
- package/__flowtests__/__generated__/ReactRelayRefetchContainerFlowtestQuery.graphql.js.flow +9 -10
- package/__flowtests__/__generated__/ReactRelayRefetchContainerFlowtest_viewer.graphql.js.flow +4 -5
- package/__flowtests__/__generated__/RelayModernFlowtest_badref.graphql.js.flow +3 -4
- package/__flowtests__/__generated__/RelayModernFlowtest_notref.graphql.js.flow +3 -4
- package/__flowtests__/__generated__/RelayModernFlowtest_user.graphql.js.flow +3 -4
- package/__flowtests__/__generated__/RelayModernFlowtest_users.graphql.js.flow +5 -6
- package/buildReactRelayContainer.js.flow +5 -5
- package/getRootVariablesForFragments.js.flow +1 -1
- package/hooks.d.ts +89 -0
- package/hooks.js +1 -1
- package/hooks.js.flow +23 -8
- package/index.d.ts +9 -0
- package/index.js +1 -1
- package/index.js.flow +40 -14
- package/isRelayEnvironment.js.flow +1 -1
- package/jest-react/internalAct.js.flow +1 -1
- package/legacy.d.ts +143 -0
- package/legacy.js +1 -1
- package/legacy.js.flow +32 -13
- package/lib/ReactRelayFragmentContainer.js +1 -1
- package/lib/ReactRelayPaginationContainer.js +8 -8
- package/lib/ReactRelayRefetchContainer.js +8 -8
- package/lib/ReactRelayTestMocker.js +5 -5
- package/lib/hooks.js +18 -8
- package/lib/index.js +30 -14
- package/lib/legacy.js +26 -13
- package/lib/relay-hooks/legacy/useBlockingPaginationFragment.js +5 -5
- package/lib/relay-hooks/legacy/useRefetchableFragmentNode.js +34 -34
- package/lib/relay-hooks/loadEntryPoint.js +2 -2
- package/lib/relay-hooks/loadQuery.js +14 -14
- package/lib/relay-hooks/preloadQuery_DEPRECATED.js +10 -10
- package/lib/relay-hooks/readFragmentInternal.js +6 -6
- package/lib/relay-hooks/rsc/serverFetchQuery.js +20 -0
- package/lib/relay-hooks/rsc/serverPreloadQuery.js +31 -0
- package/lib/relay-hooks/rsc/serverReadFragment.js +15 -0
- package/lib/relay-hooks/rsc/useQueryFromServer.js +62 -0
- package/lib/relay-hooks/useFragmentInternal_CURRENT.js +49 -25
- package/lib/relay-hooks/useFragmentInternal_EXPERIMENTAL.js +81 -44
- package/lib/relay-hooks/useLazyLoadQueryNode.js +32 -19
- package/lib/relay-hooks/useMutation.js +6 -14
- package/lib/relay-hooks/useMutationAction_EXPERIMENTAL.js +26 -0
- package/lib/relay-hooks/usePreloadedQuery.js +52 -47
- package/lib/relay-hooks/useQueryLoader.js +2 -2
- package/lib/relay-hooks/useQueryLoader_EXPERIMENTAL.js +2 -2
- package/lib/relay-hooks/useRefetchableFragmentInternal.js +31 -31
- package/lib/rsc-client_EXPERIMENTAL.js +7 -0
- package/lib/rsc_EXPERIMENTAL.js +43 -0
- package/multi-actor/ActorChange.js.flow +1 -1
- package/package.json +3 -2
- package/relay-hooks/EntryPointContainer.react.d.ts +22 -0
- package/relay-hooks/EntryPointContainer.react.js.flow +6 -6
- package/relay-hooks/EntryPointTypes.flow.js.flow +106 -108
- package/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js.flow +23 -21
- package/relay-hooks/MatchContainer.d.ts +95 -0
- package/relay-hooks/MatchContainer.js.flow +17 -11
- package/relay-hooks/NestedRelayEntryPointBuilderUtils.js.flow +3 -9
- package/relay-hooks/ProfilerContext.d.ts +18 -0
- package/relay-hooks/QueryResource.js.flow +9 -9
- package/relay-hooks/RelayEnvironmentProvider.d.ts +16 -0
- package/relay-hooks/RelayEnvironmentProvider.js.flow +2 -2
- package/relay-hooks/__flowtests__/EntryPointTypes/EntryPointElementConfig-flowtest.js.flow +6 -6
- package/relay-hooks/__flowtests__/EntryPointTypes/ExtractQueryTypes-flowtest.js.flow +50 -3
- package/relay-hooks/__flowtests__/EntryPointTypes/NestedEntrypoints-flowtest.js.flow +9 -9
- package/relay-hooks/__flowtests__/__generated__/useFragmentFlowtest_user.graphql.js.flow +3 -4
- package/relay-hooks/__flowtests__/__generated__/useFragmentFlowtest_users.graphql.js.flow +5 -6
- package/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js.flow +27 -32
- package/relay-hooks/__flowtests__/useFragment-flowtest.js.flow +25 -25
- package/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js.flow +26 -32
- package/relay-hooks/__flowtests__/useRefetchableFragment-flowtest.js.flow +23 -30
- package/relay-hooks/__flowtests__/utils.js.flow +17 -17
- package/relay-hooks/getConnectionState.js.flow +2 -2
- package/relay-hooks/legacy/FragmentResource.js.flow +13 -13
- package/relay-hooks/legacy/useBlockingPaginationFragment.js.flow +28 -25
- package/relay-hooks/legacy/useFragmentNode.js.flow +4 -4
- package/relay-hooks/legacy/useRefetchableFragmentNode.js.flow +79 -81
- package/relay-hooks/loadEntryPoint.d.ts +14 -0
- package/relay-hooks/loadEntryPoint.js.flow +15 -13
- package/relay-hooks/loadQuery.d.ts +20 -0
- package/relay-hooks/loadQuery.js.flow +19 -19
- package/relay-hooks/preloadQuery_DEPRECATED.js.flow +16 -13
- package/relay-hooks/prepareEntryPoint_DEPRECATED.js.flow +7 -7
- package/relay-hooks/readFragmentInternal.js.flow +11 -11
- package/relay-hooks/rsc/serverFetchQuery.js.flow +31 -0
- package/relay-hooks/rsc/serverPreloadQuery.js.flow +69 -0
- package/relay-hooks/rsc/serverReadFragment.js.flow +33 -0
- package/relay-hooks/rsc/useQueryFromServer.js.flow +135 -0
- package/relay-hooks/useClientQuery.d.ts +16 -0
- package/relay-hooks/useClientQuery.js.flow +2 -2
- package/relay-hooks/useEntryPointLoader.d.ts +21 -0
- package/relay-hooks/useEntryPointLoader.js.flow +11 -11
- package/relay-hooks/useFragment.d.ts +36 -0
- package/relay-hooks/useFragment.js.flow +8 -8
- package/relay-hooks/useFragmentInternal.js.flow +1 -1
- package/relay-hooks/useFragmentInternal_CURRENT.js.flow +54 -22
- package/relay-hooks/useFragmentInternal_EXPERIMENTAL.js.flow +95 -46
- package/relay-hooks/useIsOperationNodeActive.js.flow +1 -1
- package/relay-hooks/useIsParentQueryActive.js.flow +5 -1
- package/relay-hooks/useLazyLoadQuery.d.ts +19 -0
- package/relay-hooks/useLazyLoadQuery.js.flow +14 -7
- package/relay-hooks/useLazyLoadQueryNode.js.flow +67 -28
- package/relay-hooks/useLoadMoreFunction.d.ts +56 -0
- package/relay-hooks/useLoadMoreFunction.js.flow +7 -6
- package/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js.flow +5 -5
- package/relay-hooks/useMemoVariables.js.flow +1 -1
- package/relay-hooks/useMutation.d.ts +36 -0
- package/relay-hooks/useMutation.js.flow +9 -17
- package/relay-hooks/useMutationAction_EXPERIMENTAL.js.flow +68 -0
- package/relay-hooks/usePaginationFragment.d.ts +33 -0
- package/relay-hooks/usePaginationFragment.js.flow +19 -11
- package/relay-hooks/usePrefetchableForwardPaginationFragment.js.flow +23 -18
- package/relay-hooks/usePrefetchableForwardPaginationFragment_EXPERIMENTAL.js.flow +23 -18
- package/relay-hooks/usePreloadedQuery.d.ts +17 -0
- package/relay-hooks/usePreloadedQuery.js.flow +119 -85
- package/relay-hooks/useQueryLoader.d.ts +33 -0
- package/relay-hooks/useQueryLoader.js.flow +28 -24
- package/relay-hooks/useQueryLoader_EXPERIMENTAL.js.flow +10 -10
- package/relay-hooks/useRefetchableFragment.d.ts +23 -0
- package/relay-hooks/useRefetchableFragment.js.flow +20 -11
- package/relay-hooks/useRefetchableFragmentInternal.js.flow +77 -79
- package/relay-hooks/useRelayEnvironment.d.ts +10 -0
- package/relay-hooks/useRelayLoggingContext.js.flow +1 -1
- package/relay-hooks/useSubscribeToInvalidationState.d.ts +19 -0
- package/relay-hooks/useSubscribeToInvalidationState.js.flow +1 -1
- package/relay-hooks/useSubscription.d.ts +14 -0
- package/relay-hooks/useSubscription.js.flow +1 -1
- package/rsc-client_EXPERIMENTAL.d.ts +17 -0
- package/rsc-client_EXPERIMENTAL.js +10 -0
- package/rsc-client_EXPERIMENTAL.js.flow +23 -0
- package/rsc_EXPERIMENTAL.d.ts +48 -0
- package/rsc_EXPERIMENTAL.js +10 -0
- package/rsc_EXPERIMENTAL.js.flow +90 -0
|
@@ -41,9 +41,9 @@ export type QueryResource = QueryResourceImpl;
|
|
|
41
41
|
|
|
42
42
|
type QueryResourceCache = Cache<QueryResourceCacheEntry>;
|
|
43
43
|
type QueryResourceCacheEntry = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
readonly id: number,
|
|
45
|
+
readonly cacheIdentifier: string,
|
|
46
|
+
readonly operationAvailability: ?OperationAvailability,
|
|
47
47
|
// The number of received payloads for the operation.
|
|
48
48
|
// We want to differentiate the initial graphql response for the operation
|
|
49
49
|
// from the incremental responses, so later we can choose how to handle errors
|
|
@@ -58,12 +58,12 @@ type QueryResourceCacheEntry = {
|
|
|
58
58
|
};
|
|
59
59
|
export opaque type QueryResult: {
|
|
60
60
|
fragmentNode: ReaderFragment,
|
|
61
|
-
fragmentRef:
|
|
61
|
+
fragmentRef: unknown,
|
|
62
62
|
...
|
|
63
63
|
} = {
|
|
64
64
|
cacheIdentifier: string,
|
|
65
65
|
fragmentNode: ReaderFragment,
|
|
66
|
-
fragmentRef:
|
|
66
|
+
fragmentRef: unknown,
|
|
67
67
|
operation: OperationDescriptor,
|
|
68
68
|
};
|
|
69
69
|
|
|
@@ -206,7 +206,7 @@ class QueryResourceImpl {
|
|
|
206
206
|
maybeRenderPolicy: ?RenderPolicy,
|
|
207
207
|
observer: ?Observer<Snapshot>,
|
|
208
208
|
cacheBreaker: ?string | ?number,
|
|
209
|
-
profilerContext:
|
|
209
|
+
profilerContext: unknown,
|
|
210
210
|
): QueryResult {
|
|
211
211
|
const cacheIdentifier = getQueryCacheIdentifier(
|
|
212
212
|
this._environment,
|
|
@@ -238,7 +238,7 @@ class QueryResourceImpl {
|
|
|
238
238
|
maybeFetchPolicy: ?FetchPolicy,
|
|
239
239
|
maybeRenderPolicy: ?RenderPolicy,
|
|
240
240
|
observer: ?Observer<Snapshot>,
|
|
241
|
-
profilerContext:
|
|
241
|
+
profilerContext: unknown,
|
|
242
242
|
): QueryResult {
|
|
243
243
|
const environment = this._environment;
|
|
244
244
|
const fetchPolicy =
|
|
@@ -313,7 +313,7 @@ class QueryResourceImpl {
|
|
|
313
313
|
* (e.g. inside useEffect), in order to retain the operation in the Relay store
|
|
314
314
|
* and transfer ownership of the operation to the component lifecycle.
|
|
315
315
|
*/
|
|
316
|
-
retain(queryResult: QueryResult, profilerContext:
|
|
316
|
+
retain(queryResult: QueryResult, profilerContext: unknown): Disposable {
|
|
317
317
|
const environment = this._environment;
|
|
318
318
|
const {cacheIdentifier, operation} = queryResult;
|
|
319
319
|
const cacheEntry = this._getOrCreateCacheEntry(
|
|
@@ -393,7 +393,7 @@ class QueryResourceImpl {
|
|
|
393
393
|
fetchObservable: Observable<GraphQLResponse>,
|
|
394
394
|
fetchPolicy: FetchPolicy,
|
|
395
395
|
renderPolicy: RenderPolicy,
|
|
396
|
-
profilerContext:
|
|
396
|
+
profilerContext: unknown,
|
|
397
397
|
observer: Observer<Snapshot>,
|
|
398
398
|
): QueryResourceCacheEntry {
|
|
399
399
|
const environment = this._environment;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {ProviderProps, ReactElement, ReactNode} from 'react';
|
|
9
|
+
import {IEnvironment, RelayContext} from 'relay-runtime';
|
|
10
|
+
|
|
11
|
+
export interface Props {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
environment: IEnvironment;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function RelayEnvironmentProvider(props: Props): ReactElement<ProviderProps<RelayContext>>;
|
|
@@ -22,7 +22,7 @@ const React = require('react');
|
|
|
22
22
|
|
|
23
23
|
const {useMemo} = React;
|
|
24
24
|
|
|
25
|
-
type Props<TChildren> =
|
|
25
|
+
type Props<TChildren> = Readonly<{
|
|
26
26
|
children: TChildren,
|
|
27
27
|
environment: IEnvironment,
|
|
28
28
|
getEnvironmentForActor?: ?(
|
|
@@ -30,7 +30,7 @@ type Props<TChildren> = $ReadOnly<{
|
|
|
30
30
|
) => IActorEnvironment,
|
|
31
31
|
}>;
|
|
32
32
|
|
|
33
|
-
component RelayEnvironmentProvider<TChildren
|
|
33
|
+
component RelayEnvironmentProvider<TChildren extends React.Node>(
|
|
34
34
|
...props: Props<TChildren>
|
|
35
35
|
) renders TChildren {
|
|
36
36
|
const {children, environment, getEnvironmentForActor} = props;
|
|
@@ -19,7 +19,7 @@ import type {
|
|
|
19
19
|
EntryPointProps,
|
|
20
20
|
} from '../../EntryPointTypes.flow';
|
|
21
21
|
|
|
22
|
-
type MyComponentOtherProps =
|
|
22
|
+
type MyComponentOtherProps = Readonly<{
|
|
23
23
|
foo: string,
|
|
24
24
|
}>;
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ type MyComponentProps = EntryPointProps<{}, {}, MyComponentOtherProps, {}>;
|
|
|
27
27
|
|
|
28
28
|
const MyComponent = (_props: MyComponentProps) => null;
|
|
29
29
|
|
|
30
|
-
type PreloadParams =
|
|
30
|
+
type PreloadParams = Readonly<{}>;
|
|
31
31
|
|
|
32
32
|
type MyComponentEntryPointType = EntryPoint<PreloadParams, typeof MyComponent>;
|
|
33
33
|
|
|
@@ -42,9 +42,9 @@ type OtherProps = MyComponentProps['props'];
|
|
|
42
42
|
opaque type __SUBTYPE_CHECK_1__: OtherProps = MyComponentEntryPointProps;
|
|
43
43
|
opaque type __SUBTYPE_CHECK_2__: MyComponentEntryPointProps = OtherProps;
|
|
44
44
|
|
|
45
|
-
({foo: ''}
|
|
45
|
+
({foo: ''}) as OtherProps;
|
|
46
46
|
|
|
47
|
-
({foo: ''}
|
|
47
|
+
({foo: ''}) as MyComponentEntryPointProps;
|
|
48
48
|
|
|
49
|
-
// $FlowExpectedError[incompatible-
|
|
50
|
-
({foo: null}
|
|
49
|
+
// $FlowExpectedError[incompatible-type]
|
|
50
|
+
({foo: null}) as MyComponentEntryPointProps;
|
|
@@ -15,12 +15,14 @@ import type {
|
|
|
15
15
|
EnvironmentProviderOptions,
|
|
16
16
|
ExtractQueryTypes,
|
|
17
17
|
PreloadedQuery,
|
|
18
|
+
ThinQueryParams,
|
|
18
19
|
} from '../../EntryPointTypes.flow';
|
|
20
|
+
import type {OperationType} from 'relay-runtime';
|
|
19
21
|
|
|
20
22
|
type Query = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
readonly variables: {foo: string, bar: number},
|
|
24
|
+
readonly response: unknown,
|
|
25
|
+
readonly rawResponse?: {...},
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
const _good: ExtractQueryTypes<
|
|
@@ -35,9 +37,54 @@ const _bad: ExtractQueryTypes<
|
|
|
35
37
|
EnvironmentProviderOptions,
|
|
36
38
|
{root: PreloadedQuery<Query>},
|
|
37
39
|
// $FlowExpectedError[prop-missing]
|
|
40
|
+
// $FlowExpectedError[incompatible-type]
|
|
38
41
|
>['root']['variables'] = {
|
|
39
42
|
memebers_are_checked: true,
|
|
40
43
|
// $FlowExpectedError[incompatible-type]
|
|
41
44
|
foo: 1,
|
|
42
45
|
bar: 3,
|
|
43
46
|
};
|
|
47
|
+
|
|
48
|
+
declare type RootQuery = OperationType;
|
|
49
|
+
|
|
50
|
+
type ActualRequiredQueryType = ExtractQueryTypes<
|
|
51
|
+
EnvironmentProviderOptions,
|
|
52
|
+
{root: PreloadedQuery<RootQuery>},
|
|
53
|
+
>;
|
|
54
|
+
|
|
55
|
+
type ExpectedRequiredQueryType = {
|
|
56
|
+
root: ThinQueryParams<RootQuery, EnvironmentProviderOptions>,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
declare const ActualRequiredQuery: ActualRequiredQueryType;
|
|
60
|
+
declare const ExpectedRequiredQuery: ExpectedRequiredQueryType;
|
|
61
|
+
ActualRequiredQuery as ExpectedRequiredQueryType;
|
|
62
|
+
ExpectedRequiredQuery as ActualRequiredQueryType;
|
|
63
|
+
|
|
64
|
+
type ActualOptionalQueryType = ExtractQueryTypes<
|
|
65
|
+
EnvironmentProviderOptions,
|
|
66
|
+
{root: PreloadedQuery<RootQuery> | void},
|
|
67
|
+
>;
|
|
68
|
+
|
|
69
|
+
type ExpectedOptionalQueryType = {
|
|
70
|
+
root: ThinQueryParams<RootQuery, EnvironmentProviderOptions> | void,
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare const ActualOptionalQuery: ActualOptionalQueryType;
|
|
74
|
+
declare const ExpectedOptionalQuery: ExpectedOptionalQueryType;
|
|
75
|
+
ActualOptionalQuery as ExpectedOptionalQueryType;
|
|
76
|
+
ExpectedOptionalQuery as ActualOptionalQueryType;
|
|
77
|
+
|
|
78
|
+
type ActualNullableQueryType = ExtractQueryTypes<
|
|
79
|
+
EnvironmentProviderOptions,
|
|
80
|
+
{root: PreloadedQuery<RootQuery> | void},
|
|
81
|
+
>;
|
|
82
|
+
|
|
83
|
+
type ExpectedNullableQueryType = {
|
|
84
|
+
root: ThinQueryParams<RootQuery, EnvironmentProviderOptions> | void,
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
declare const ActualNullableQuery: ActualNullableQueryType;
|
|
88
|
+
declare const ExpectedNullableQuery: ExpectedNullableQueryType;
|
|
89
|
+
ActualNullableQuery as ExpectedNullableQueryType;
|
|
90
|
+
ExpectedNullableQuery as ActualNullableQueryType;
|
|
@@ -29,7 +29,7 @@ type NestedEntrypointComponentProps = EntryPointProps<{}>;
|
|
|
29
29
|
const NestedEntrypointComponent = (_props: NestedEntrypointComponentProps) =>
|
|
30
30
|
null;
|
|
31
31
|
|
|
32
|
-
type NestedEntrypointPreloadParams =
|
|
32
|
+
type NestedEntrypointPreloadParams = Readonly<{
|
|
33
33
|
subEntrypointPreloadParam: string,
|
|
34
34
|
}>;
|
|
35
35
|
|
|
@@ -38,16 +38,16 @@ type NestedEntryPointType = EntryPoint<
|
|
|
38
38
|
typeof NestedEntrypointComponent,
|
|
39
39
|
>;
|
|
40
40
|
|
|
41
|
-
const NestedEntryPoint =
|
|
41
|
+
const NestedEntryPoint = {
|
|
42
42
|
getPreloadProps({subEntrypointPreloadParam: _subEntrypointPreloadParam}) {
|
|
43
43
|
return {};
|
|
44
44
|
},
|
|
45
45
|
root: mockJSResource(NestedEntrypointComponent),
|
|
46
|
-
}
|
|
46
|
+
} as NestedEntryPointType;
|
|
47
47
|
|
|
48
48
|
// Define the parent entrypoint's component
|
|
49
49
|
|
|
50
|
-
type PreloadedEntrypoints =
|
|
50
|
+
type PreloadedEntrypoints = Readonly<{
|
|
51
51
|
nestedComponent: PreloadedEntryPoint<typeof NestedEntrypointComponent>,
|
|
52
52
|
}>;
|
|
53
53
|
|
|
@@ -61,7 +61,7 @@ const ParentEntrypointComponent = (_props: ParentEntrypointComponentProps) =>
|
|
|
61
61
|
* INCORRECT params passed into the nested entrypoints.
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
|
-
type BadParentEntrypointParams =
|
|
64
|
+
type BadParentEntrypointParams = Readonly<{}>;
|
|
65
65
|
|
|
66
66
|
({
|
|
67
67
|
getPreloadProps(_params: BadParentEntrypointParams) {
|
|
@@ -69,7 +69,7 @@ type BadParentEntrypointParams = $ReadOnly<{}>;
|
|
|
69
69
|
entryPoints: {
|
|
70
70
|
nestedComponent: NestedRelayEntryPoint({
|
|
71
71
|
/**
|
|
72
|
-
$FlowExpectedError The entryPointParams here should be of type
|
|
72
|
+
$FlowExpectedError[incompatible-type] The entryPointParams here should be of type
|
|
73
73
|
NestedEntrypointPreloadParams, but it does not contain subEntrypointPreloadParam
|
|
74
74
|
*/
|
|
75
75
|
entryPoint: NestedEntryPoint,
|
|
@@ -79,14 +79,14 @@ type BadParentEntrypointParams = $ReadOnly<{}>;
|
|
|
79
79
|
};
|
|
80
80
|
},
|
|
81
81
|
root: mockJSResource(ParentEntrypointComponent),
|
|
82
|
-
}
|
|
82
|
+
}) as EntryPoint<BadParentEntrypointParams, typeof ParentEntrypointComponent>;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Create a parent entrypoint with the component with
|
|
86
86
|
* CORRECT params passed into the nested entrypoints.
|
|
87
87
|
*/
|
|
88
88
|
|
|
89
|
-
type GoodParentEntrypointParams =
|
|
89
|
+
type GoodParentEntrypointParams = Readonly<{}>;
|
|
90
90
|
|
|
91
91
|
({
|
|
92
92
|
getPreloadProps(_params: GoodParentEntrypointParams) {
|
|
@@ -103,4 +103,4 @@ type GoodParentEntrypointParams = $ReadOnly<{}>;
|
|
|
103
103
|
};
|
|
104
104
|
},
|
|
105
105
|
root: mockJSResource(ParentEntrypointComponent),
|
|
106
|
-
}
|
|
106
|
+
}) as EntryPoint<GoodParentEntrypointParams, typeof ParentEntrypointComponent>;
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @oncall relay
|
|
8
8
|
*
|
|
9
|
-
* @generated SignedSource<<
|
|
9
|
+
* @generated SignedSource<<b0435066c8bc918fc030ba8ea4aebfb8>>
|
|
10
10
|
* @flow
|
|
11
11
|
* @lightSyntaxTransform
|
|
12
|
-
* @nogrep
|
|
13
12
|
*/
|
|
14
13
|
|
|
15
14
|
/* eslint-disable */
|
|
@@ -50,10 +49,10 @@ var node/*: ReaderFragment*/ = {
|
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
if (__DEV__) {
|
|
53
|
-
(node
|
|
52
|
+
(node/*:: as any*/).hash = "a0eb71a1bbfb0eb3a4c42fb5a69a7f81";
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
module.exports = ((node
|
|
55
|
+
module.exports = ((node/*:: as any*/)/*:: as Fragment<
|
|
57
56
|
useFragmentFlowtest_user$fragmentType,
|
|
58
57
|
useFragmentFlowtest_user$data,
|
|
59
58
|
>*/);
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @oncall relay
|
|
8
8
|
*
|
|
9
|
-
* @generated SignedSource<<
|
|
9
|
+
* @generated SignedSource<<310a5ea49f6836992f54da76b8f7afae>>
|
|
10
10
|
* @flow
|
|
11
11
|
* @lightSyntaxTransform
|
|
12
|
-
* @nogrep
|
|
13
12
|
*/
|
|
14
13
|
|
|
15
14
|
/* eslint-disable */
|
|
@@ -20,11 +19,11 @@
|
|
|
20
19
|
import type { Fragment, ReaderFragment } from 'relay-runtime';
|
|
21
20
|
import type { FragmentType } from "relay-runtime";
|
|
22
21
|
declare export opaque type useFragmentFlowtest_users$fragmentType: FragmentType;
|
|
23
|
-
export type useFragmentFlowtest_users$data =
|
|
22
|
+
export type useFragmentFlowtest_users$data = ReadonlyArray<{|
|
|
24
23
|
+id: string,
|
|
25
24
|
+$fragmentType: useFragmentFlowtest_users$fragmentType,
|
|
26
25
|
|}>;
|
|
27
|
-
export type useFragmentFlowtest_users$key =
|
|
26
|
+
export type useFragmentFlowtest_users$key = ReadonlyArray<{
|
|
28
27
|
+$data?: useFragmentFlowtest_users$data,
|
|
29
28
|
+$fragmentSpreads: useFragmentFlowtest_users$fragmentType,
|
|
30
29
|
...
|
|
@@ -52,10 +51,10 @@ var node/*: ReaderFragment*/ = {
|
|
|
52
51
|
};
|
|
53
52
|
|
|
54
53
|
if (__DEV__) {
|
|
55
|
-
(node
|
|
54
|
+
(node/*:: as any*/).hash = "8b9b9b23494aec63a7cb96eed58ebcbc";
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
module.exports = ((node
|
|
57
|
+
module.exports = ((node/*:: as any*/)/*:: as Fragment<
|
|
59
58
|
useFragmentFlowtest_users$fragmentType,
|
|
60
59
|
useFragmentFlowtest_users$data,
|
|
61
60
|
>*/);
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
} from './utils';
|
|
31
31
|
|
|
32
32
|
type ExpectedReturnType<
|
|
33
|
-
TRefetchVariables
|
|
34
|
-
TLoadMoreVariables
|
|
33
|
+
TRefetchVariables extends Variables,
|
|
34
|
+
TLoadMoreVariables extends Variables,
|
|
35
35
|
TFragmentData,
|
|
36
36
|
> = {
|
|
37
37
|
data: TFragmentData,
|
|
@@ -46,63 +46,58 @@ type ExpectedReturnType<
|
|
|
46
46
|
|
|
47
47
|
// Nullability of returned data type is correct
|
|
48
48
|
// $FlowFixMe[prop-missing]
|
|
49
|
-
// $FlowFixMe[incompatible-
|
|
49
|
+
// $FlowFixMe[incompatible-type]
|
|
50
50
|
// $FlowFixMe[incompatible-exact]
|
|
51
51
|
// $FlowFixMe[react-rule-hook]
|
|
52
|
-
|
|
52
|
+
useBlockingPaginationFragment(
|
|
53
53
|
refetchableFragmentInput,
|
|
54
54
|
keyNonNullable,
|
|
55
|
-
)
|
|
55
|
+
) as ExpectedReturnType<QueryVariablesSubset, QueryVariables, NonNullableData>;
|
|
56
56
|
|
|
57
57
|
// $FlowFixMe[react-rule-hook]
|
|
58
|
-
|
|
58
|
+
useBlockingPaginationFragment(
|
|
59
59
|
refetchableFragmentInput,
|
|
60
60
|
keyNullable,
|
|
61
|
-
)
|
|
61
|
+
) as ExpectedReturnType<QueryVariables, QueryVariables, NullableData>;
|
|
62
62
|
|
|
63
|
-
// $FlowExpectedError: can't cast nullable to non-nullable
|
|
64
63
|
// $FlowFixMe[react-rule-hook]
|
|
65
|
-
// $FlowFixMe[incompatible-cast
|
|
66
|
-
|
|
64
|
+
// $FlowFixMe[incompatible-type] can't cast nullable to non-nullable
|
|
65
|
+
useBlockingPaginationFragment(
|
|
67
66
|
refetchableFragmentInput,
|
|
68
67
|
keyNullable,
|
|
69
|
-
)
|
|
68
|
+
) as ExpectedReturnType<QueryVariables, QueryVariables, NonNullableData>;
|
|
70
69
|
|
|
71
|
-
// $FlowExpectedError: actual type of returned data is correct
|
|
72
70
|
// $FlowFixMe[react-rule-hook]
|
|
73
71
|
// $FlowFixMe[incompatible-exact]
|
|
74
72
|
// $FlowFixMe[prop-missing]
|
|
75
|
-
// $FlowFixMe[incompatible-
|
|
76
|
-
|
|
73
|
+
// $FlowFixMe[incompatible-type] actual type of returned data is correct
|
|
74
|
+
useBlockingPaginationFragment(
|
|
77
75
|
refetchableFragmentInput,
|
|
78
|
-
// $FlowExpectedError[incompatible-
|
|
76
|
+
// $FlowExpectedError[incompatible-type]
|
|
79
77
|
keyAnotherNonNullable,
|
|
80
|
-
)
|
|
78
|
+
) as ExpectedReturnType<QueryVariables, QueryVariablesSubset, NonNullableData>;
|
|
81
79
|
|
|
82
|
-
// $FlowExpectedError[incompatible-
|
|
80
|
+
// $FlowExpectedError[incompatible-type] `Example_user$fragmentType` is incompatible with `FragmentType`
|
|
83
81
|
// $FlowFixMe[react-rule-hook]
|
|
84
|
-
|
|
82
|
+
useBlockingPaginationFragment(
|
|
85
83
|
refetchableFragmentInput,
|
|
86
|
-
// $FlowExpectedError[incompatible-
|
|
84
|
+
// $FlowExpectedError[incompatible-type]
|
|
87
85
|
keyAnotherNullable,
|
|
88
|
-
)
|
|
86
|
+
) as ExpectedReturnType<QueryVariables, QueryVariables, NullableData>;
|
|
89
87
|
|
|
90
|
-
// $FlowExpectedError: Key should not be a user provided object
|
|
91
88
|
// $FlowFixMe[react-rule-hook]
|
|
92
|
-
// $FlowFixMe[
|
|
89
|
+
// $FlowFixMe[incompatible-type] Key should not be a user provided object
|
|
93
90
|
// $FlowFixMe[cannot-resolve-name]
|
|
94
91
|
useBlockingPaginationFragment(fragmentInput, {abc: 123});
|
|
95
92
|
|
|
96
|
-
// $FlowExpectedError: Key should not be an empty object
|
|
97
93
|
// $FlowFixMe[react-rule-hook]
|
|
98
|
-
// $FlowFixMe[
|
|
94
|
+
// $FlowFixMe[incompatible-type] Key should not be an empty object
|
|
99
95
|
// $FlowFixMe[cannot-resolve-name]
|
|
100
96
|
useBlockingPaginationFragment(fragmentInput, {});
|
|
101
97
|
|
|
102
|
-
// $FlowExpectedError: Key should be the `<name>$key` type from generated flow
|
|
103
98
|
// $FlowFixMe[react-rule-hook]
|
|
104
|
-
// $FlowFixMe[
|
|
105
|
-
// $FlowFixMe[cannot-resolve-name]
|
|
99
|
+
// $FlowFixMe[incompatible-type]
|
|
100
|
+
// $FlowFixMe[cannot-resolve-name] Key should be the `<name>$key` type from generated flow
|
|
106
101
|
useBlockingPaginationFragment(fragmentInput, fragmentData);
|
|
107
102
|
|
|
108
103
|
// Refetch function options:
|
|
@@ -114,12 +109,12 @@ const {refetch} = useBlockingPaginationFragment(
|
|
|
114
109
|
refetchableFragmentInput,
|
|
115
110
|
keyNonNullable,
|
|
116
111
|
);
|
|
117
|
-
// $FlowExpectedError: internal option
|
|
112
|
+
// $FlowExpectedError[incompatible-type] : internal option
|
|
118
113
|
refetch(variables, {
|
|
119
114
|
__environment: environment,
|
|
120
115
|
});
|
|
121
116
|
|
|
122
|
-
// $FlowExpectedError: doesn't exist
|
|
117
|
+
// $FlowExpectedError[incompatible-type] : doesn't exist
|
|
123
118
|
refetch(variables, {
|
|
124
119
|
NON_EXIST: 'NON_EXIST',
|
|
125
120
|
});
|
|
@@ -136,17 +131,17 @@ const {loadNext} = useBlockingPaginationFragment(
|
|
|
136
131
|
// Accepts extraVariables
|
|
137
132
|
loadNext(10, {
|
|
138
133
|
// $FlowFixMe[prop-missing]
|
|
139
|
-
// $FlowFixMe[incompatible-
|
|
134
|
+
// $FlowFixMe[incompatible-type]
|
|
140
135
|
UNSTABLE_extraVariables: extraVariables,
|
|
141
136
|
});
|
|
142
137
|
|
|
143
138
|
// $FlowFixMe[prop-missing]
|
|
144
139
|
loadNext(10, {
|
|
145
|
-
// $FlowExpectedError: doesn't accept variables not available in the Flow type
|
|
140
|
+
// $FlowExpectedError[incompatible-type] : doesn't accept variables not available in the Flow type
|
|
146
141
|
UNSTABLE_extraVariables: invalidVariables,
|
|
147
142
|
});
|
|
148
143
|
|
|
149
|
-
// $FlowExpectedError: doesn't exist
|
|
144
|
+
// $FlowExpectedError[incompatible-type] : doesn't exist
|
|
150
145
|
loadNext(10, {
|
|
151
146
|
UNSTABLE_foo: invalidVariables,
|
|
152
147
|
});
|
|
@@ -40,44 +40,44 @@ const usersFragment: useFragmentFlowtest_users$fragment = graphql`
|
|
|
40
40
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
41
41
|
|
|
42
42
|
// Nullability of returned data type is correct
|
|
43
|
-
|
|
43
|
+
useFragment(
|
|
44
44
|
userFragment,
|
|
45
|
-
|
|
46
|
-
)
|
|
47
|
-
|
|
45
|
+
Any as useFragmentFlowtest_user$key,
|
|
46
|
+
) as useFragmentFlowtest_user$data;
|
|
47
|
+
useFragment(
|
|
48
48
|
userFragment,
|
|
49
|
-
|
|
50
|
-
)
|
|
51
|
-
|
|
49
|
+
Any as ?useFragmentFlowtest_user$key,
|
|
50
|
+
) as ?useFragmentFlowtest_user$data;
|
|
51
|
+
useFragment(
|
|
52
52
|
usersFragment,
|
|
53
|
-
|
|
54
|
-
)
|
|
55
|
-
|
|
53
|
+
Any as useFragmentFlowtest_users$key,
|
|
54
|
+
) as useFragmentFlowtest_users$data;
|
|
55
|
+
useFragment(
|
|
56
56
|
usersFragment,
|
|
57
|
-
|
|
58
|
-
)
|
|
57
|
+
Any as ?useFragmentFlowtest_users$key,
|
|
58
|
+
) as ?useFragmentFlowtest_users$data;
|
|
59
59
|
|
|
60
|
-
// $FlowExpectedError: can't cast nullable to non-nullable
|
|
61
|
-
|
|
60
|
+
// $FlowExpectedError[incompatible-type] : can't cast nullable to non-nullable
|
|
61
|
+
useFragment(
|
|
62
62
|
userFragment,
|
|
63
|
-
|
|
64
|
-
)
|
|
65
|
-
// $FlowExpectedError: can't cast nullable plural to non-nullable plural
|
|
66
|
-
|
|
63
|
+
Any as ?useFragmentFlowtest_user$key,
|
|
64
|
+
) as useFragmentFlowtest_user$data;
|
|
65
|
+
// $FlowExpectedError[incompatible-type] : can't cast nullable plural to non-nullable plural
|
|
66
|
+
useFragment(
|
|
67
67
|
usersFragment,
|
|
68
|
-
|
|
69
|
-
)
|
|
68
|
+
Any as ?useFragmentFlowtest_users$key,
|
|
69
|
+
) as useFragmentFlowtest_users$data;
|
|
70
70
|
|
|
71
|
-
// $FlowExpectedError: Key should be one of the generated types
|
|
71
|
+
// $FlowExpectedError[incompatible-type] : Key should be one of the generated types
|
|
72
72
|
useFragment(userFragment, 'INVALID_KEY');
|
|
73
73
|
|
|
74
|
-
// $FlowExpectedError: Key should not be a user provided object
|
|
74
|
+
// $FlowExpectedError[incompatible-type] : Key should not be a user provided object
|
|
75
75
|
useFragment(userFragment, {a: 123});
|
|
76
76
|
|
|
77
|
-
// $FlowExpectedError: Key should not be an empty object
|
|
77
|
+
// $FlowExpectedError[incompatible-type] : Key should not be an empty object
|
|
78
78
|
useFragment(userFragment, {});
|
|
79
79
|
|
|
80
|
-
// $FlowExpectedError: Key should be the `<name>$key` type from generated flow
|
|
81
|
-
useFragment(userFragment,
|
|
80
|
+
// $FlowExpectedError[incompatible-type] : Key should be the `<name>$key` type from generated flow
|
|
81
|
+
useFragment(userFragment, Any as useFragmentFlowtest_user$data);
|
|
82
82
|
|
|
83
83
|
/* eslint-enable react-hooks/rules-of-hooks */
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
} from './utils';
|
|
31
31
|
|
|
32
32
|
type ExpectedReturnType<
|
|
33
|
-
TRefetchVariables
|
|
34
|
-
TLoadMoreVariables
|
|
33
|
+
TRefetchVariables extends Variables,
|
|
34
|
+
TLoadMoreVariables extends Variables,
|
|
35
35
|
TFragmentData,
|
|
36
36
|
> = {
|
|
37
37
|
data: TFragmentData,
|
|
@@ -48,60 +48,54 @@ type ExpectedReturnType<
|
|
|
48
48
|
|
|
49
49
|
// Nullability of returned data type is correct
|
|
50
50
|
// $FlowFixMe[prop-missing]
|
|
51
|
-
// $FlowFixMe[incompatible-
|
|
51
|
+
// $FlowFixMe[incompatible-type]
|
|
52
52
|
// $FlowFixMe[incompatible-exact]
|
|
53
53
|
// $FlowFixMe[react-rule-hook]
|
|
54
|
-
|
|
54
|
+
usePaginationFragment(
|
|
55
55
|
refetchableFragmentInput,
|
|
56
56
|
keyNonNullable,
|
|
57
|
-
)
|
|
57
|
+
) as ExpectedReturnType<QueryVariablesSubset, QueryVariables, NonNullableData>;
|
|
58
58
|
|
|
59
59
|
// $FlowFixMe[react-rule-hook]
|
|
60
|
-
|
|
60
|
+
usePaginationFragment(
|
|
61
61
|
refetchableFragmentInput,
|
|
62
62
|
keyNullable,
|
|
63
|
-
)
|
|
63
|
+
) as ExpectedReturnType<QueryVariables, QueryVariables, NullableData>;
|
|
64
64
|
|
|
65
|
-
// $FlowExpectedError: can't cast nullable to non-nullable
|
|
66
65
|
// $FlowFixMe[react-rule-hook]
|
|
67
|
-
// $FlowFixMe[incompatible-cast
|
|
68
|
-
|
|
66
|
+
// $FlowFixMe[incompatible-type] can't cast nullable to non-nullable
|
|
67
|
+
usePaginationFragment(
|
|
69
68
|
refetchableFragmentInput,
|
|
70
69
|
keyNullable,
|
|
71
|
-
)
|
|
70
|
+
) as ExpectedReturnType<QueryVariables, QueryVariables, NonNullableData>;
|
|
72
71
|
|
|
73
|
-
// $FlowExpectedError: actual type of returned data is correct
|
|
74
72
|
// $FlowFixMe[react-rule-hook]
|
|
75
73
|
// $FlowFixMe[incompatible-exact]
|
|
76
74
|
// $FlowFixMe[prop-missing]
|
|
77
|
-
// $FlowFixMe[incompatible-
|
|
78
|
-
|
|
75
|
+
// $FlowFixMe[incompatible-type] actual type of returned data is correct
|
|
76
|
+
usePaginationFragment(
|
|
79
77
|
refetchableFragmentInput,
|
|
80
|
-
// $FlowFixMe[incompatible-
|
|
78
|
+
// $FlowFixMe[incompatible-type]
|
|
81
79
|
keyAnotherNonNullable,
|
|
82
|
-
)
|
|
83
|
-
// $FlowExpectedError
|
|
80
|
+
) as ExpectedReturnType<QueryVariables, QueryVariablesSubset, NonNullableData>;
|
|
84
81
|
// $FlowFixMe[react-rule-hook]
|
|
85
|
-
// $FlowFixMe[incompatible-
|
|
86
|
-
|
|
82
|
+
// $FlowFixMe[incompatible-type]
|
|
83
|
+
usePaginationFragment(
|
|
87
84
|
refetchableFragmentInput,
|
|
88
|
-
// $FlowFixMe[incompatible-
|
|
85
|
+
// $FlowFixMe[incompatible-type]
|
|
89
86
|
keyAnotherNullable,
|
|
90
|
-
)
|
|
87
|
+
) as ExpectedReturnType<QueryVariables, QueryVariables, NonNullableData>;
|
|
91
88
|
|
|
92
|
-
// $FlowExpectedError: Key should not be a user provided object
|
|
93
89
|
// $FlowFixMe[react-rule-hook]
|
|
94
|
-
// $FlowFixMe[
|
|
90
|
+
// $FlowFixMe[incompatible-type] Key should not be a user provided object
|
|
95
91
|
usePaginationFragment(refetchableFragmentInput, {abc: 123});
|
|
96
92
|
|
|
97
|
-
// $FlowExpectedError: Key should not be an empty object
|
|
98
93
|
// $FlowFixMe[react-rule-hook]
|
|
99
|
-
// $FlowFixMe[
|
|
94
|
+
// $FlowFixMe[incompatible-type] Key should not be an empty object
|
|
100
95
|
usePaginationFragment(refetchableFragmentInput, {});
|
|
101
96
|
|
|
102
|
-
// $FlowExpectedError: Key should be the `<name>$key` type from generated flow
|
|
103
97
|
// $FlowFixMe[react-rule-hook]
|
|
104
|
-
// $FlowFixMe[
|
|
98
|
+
// $FlowFixMe[incompatible-type] Key should be the `<name>$key` type from generated flow
|
|
105
99
|
usePaginationFragment(refetchableFragmentInput, fragmentData);
|
|
106
100
|
|
|
107
101
|
// Refetch function options:
|
|
@@ -113,12 +107,12 @@ const {refetch} = usePaginationFragment(
|
|
|
113
107
|
refetchableFragmentInput,
|
|
114
108
|
keyNonNullable,
|
|
115
109
|
);
|
|
116
|
-
// $FlowExpectedError: internal option
|
|
110
|
+
// $FlowExpectedError[incompatible-type] : internal option
|
|
117
111
|
refetch(variables, {
|
|
118
112
|
__environment: environment,
|
|
119
113
|
});
|
|
120
114
|
|
|
121
|
-
// $FlowExpectedError: doesn't exist
|
|
115
|
+
// $FlowExpectedError[incompatible-type] : doesn't exist
|
|
122
116
|
refetch(variables, {
|
|
123
117
|
NON_EXIST: 'NON_EXIST',
|
|
124
118
|
});
|
|
@@ -135,17 +129,17 @@ const {loadNext} = usePaginationFragment(
|
|
|
135
129
|
// Accepts extraVariables
|
|
136
130
|
loadNext(10, {
|
|
137
131
|
// $FlowFixMe[prop-missing]
|
|
138
|
-
// $FlowFixMe[incompatible-
|
|
132
|
+
// $FlowFixMe[incompatible-type]
|
|
139
133
|
UNSTABLE_extraVariables: extraVariables,
|
|
140
134
|
});
|
|
141
135
|
|
|
142
136
|
// $FlowFixMe[prop-missing]
|
|
143
137
|
loadNext(10, {
|
|
144
|
-
// $FlowExpectedError: doesn't accept variables not available in the Flow type
|
|
138
|
+
// $FlowExpectedError[incompatible-type] : doesn't accept variables not available in the Flow type
|
|
145
139
|
UNSTABLE_extraVariables: invalidVariables,
|
|
146
140
|
});
|
|
147
141
|
|
|
148
|
-
// $FlowExpectedError: doesn't exist
|
|
142
|
+
// $FlowExpectedError[incompatible-type] : doesn't exist
|
|
149
143
|
loadNext(10, {
|
|
150
144
|
UNSTABLE_foo: invalidVariables,
|
|
151
145
|
});
|