Add type tests for process color (#49832)

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

Changelog:
[Internal] - Added type tests for process color

Reviewed By: huntie

Differential Revision: D70561282

fbshipit-source-id: b410459233348fe584bee29b74b72804013f170f
This commit is contained in:
Dawid Małecki
2025-03-05 02:44:20 -08:00
committed by Facebook GitHub Bot
parent 12ac3e7273
commit a1ed5f9014
@@ -120,6 +120,7 @@ import {
ToastAndroid,
Touchable,
LayoutAnimation,
processColor,
experimental_LayoutConformance as LayoutConformance,
} from 'react-native';
@@ -371,6 +372,19 @@ const combinedStyle10: StyleProp<ImageStyle> = StyleSheet.compose(
null,
);
type TestOpaque = symbol & {smth: string};
declare function createTestOpaque(): TestOpaque;
const testOpaque = createTestOpaque();
// @ts-expect-error
processColor(testOpaque);
processColor('#000000');
processColor(123456);
// @ts-expect-error
processColor(true);
// @ts-expect-error
processColor(Symbol('test'));
const testNativeSyntheticEvent = <T extends {}>(
e: NativeSyntheticEvent<T>,
): void => {