mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
ffac8f8ef0
commit
cf664c65e2
@@ -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, ...}) => (
|
||||
|
||||
Reference in New Issue
Block a user