Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace $FlowFixMe in TextAncestor #48704

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Replace $FlowFixMe in TextAncestor
Summary:
Changelog:
[General][Changed] - Improved types in TextAncestor

Differential Revision: D68213115
  • Loading branch information
coado authored and facebook-github-bot committed Jan 15, 2025
commit 3f462160f06096c1cd7428034c47fcbdb700db2f
3 changes: 1 addition & 2 deletions packages/react-native/Libraries/Text/TextAncestor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ const React = require('react');
/**
* Whether the current element is the descendant of a <Text> element.
*/
const TextAncestorContext: React$Context<$FlowFixMe> =
React.createContext(false);
const TextAncestorContext: React$Context<boolean> = React.createContext(false);
if (__DEV__) {
TextAncestorContext.displayName = 'TextAncestorContext';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8460,7 +8460,7 @@ declare module.exports: Text;
`;

exports[`public API should not change unintentionally Libraries/Text/TextAncestor.js 1`] = `
"declare const TextAncestorContext: React$Context<$FlowFixMe>;
"declare const TextAncestorContext: React$Context<boolean>;
declare module.exports: TextAncestorContext;
"
`;
Expand Down
Loading