Skip to content

Commit

Permalink
Add explicit annotations in relay to prepare for ref-as-prop typing c…
Browse files Browse the repository at this point in the history
…hange

Reviewed By: gkz

Differential Revision: D65224886

fbshipit-source-id: fba1a93f80f59f0856c0b338a80ca1b343a90790
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Oct 30, 2024
1 parent be1693a commit 065c60b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ describe.skip('ReactRelayFragmentContainer-react-double-effects-test', () => {
return user.name;
};

const FragmentContainer = createContainer(FragmentComponent, {
const FragmentContainer = createContainer<
any,
void,
typeof FragmentComponent,
>(FragmentComponent, {
// eslint-disable-next-line relay/graphql-naming
user: gqlFragment,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

'use strict';

import type {RenderProps} from 'react-relay/ReactRelayQueryRenderer';
import type {
HandleFieldPayload,
RecordSourceProxy,
Expand Down Expand Up @@ -191,8 +192,7 @@ describe('ReactRelayTestMocker with Containers', () => {
// In www, this is differently typed (via react-test-renderer.js.flow) than in
// fbsource, so it isn't obvious (without syncing react-test-renderer.js.flow) how
// to get flow to accept this typing.
// $FlowFixMe[missing-local-annot] Error found while enabling LTI on this file
props => {
(props: $FlowFixMe) => {
return (
<img
testID="profile_picture"
Expand All @@ -211,7 +211,7 @@ describe('ReactRelayTestMocker with Containers', () => {
environment={environment}
query={UserQuery}
variables={{}}
render={({error, props}) => {
render={({error, props}: RenderProps<$FlowFixMe>) => {
if (props) {
return (
<div>
Expand Down

0 comments on commit 065c60b

Please sign in to comment.