Standardize subtyping error code into incompatible-type in react native and metro (#53312)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53312

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D80400976

fbshipit-source-id: 196af69c0b9621b2a2675b232406639773e04933
This commit is contained in:
Sam Zhou
2025-08-18 09:04:31 -07:00
committed by Facebook GitHub Bot
parent ffac8f8ef0
commit cf664c65e2
188 changed files with 489 additions and 488 deletions
@@ -172,7 +172,9 @@ class NativeCxxModuleExampleExample extends React.Component<{}, State> {
DeviceEventEmitter.addListener(CUSTOM_EVENT_TYPE, (...args) => {
this._setResult(
'emitDeviceEvent',
`${CUSTOM_EVENT_TYPE}(${args.map(s => (typeof s === 'object' ? JSON.stringify(s) : s)).join(', ')})`,
`${CUSTOM_EVENT_TYPE}(${args
.map(s => (typeof s === 'object' ? JSON.stringify(s) : s))
.join(', ')})`,
);
});
NativeCxxModuleExample?.emitCustomDeviceEvent(CUSTOM_EVENT_TYPE);
@@ -328,7 +330,7 @@ class NativeCxxModuleExampleExample extends React.Component<{}, State> {
</TouchableOpacity>
</View>
<FlatList
// $FlowFixMe[incompatible-type-arg]
// $FlowFixMe[incompatible-type]
data={Object.keys(this._tests)}
keyExtractor={item => item}
renderItem={({item}: {item: Examples, ...}) => (
@@ -348,7 +350,7 @@ class NativeCxxModuleExampleExample extends React.Component<{}, State> {
</RNTesterText>
</View>
<FlatList
// $FlowFixMe[incompatible-type-arg]
// $FlowFixMe[incompatible-type]
data={Object.keys(this._errorTests)}
keyExtractor={item => item}
renderItem={({item}: {item: ErrorExamples, ...}) => (