From 9d75ddfff87d600b4e884d245c69132934de2722 Mon Sep 17 00:00:00 2001 From: Aleksandra Cynk Date: Wed, 22 May 2024 13:35:28 +0200 Subject: [PATCH] Ts-prune ignore --- src/reanimated2/Colors.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/reanimated2/Colors.ts b/src/reanimated2/Colors.ts index 93d5c220a52e..3d4d0d0e4f1b 100644 --- a/src/reanimated2/Colors.ts +++ b/src/reanimated2/Colors.ts @@ -168,6 +168,7 @@ function parsePercentage(str: string): number { const names: Record = makeShareable({ transparent: 0x00000000, + /* spell-checker: disable */ // http://www.w3.org/TR/css3-color/#svg-color aliceblue: 0xf0f8ffff, antiquewhite: 0xfaebd7ff, @@ -318,6 +319,7 @@ const names: Record = makeShareable({ whitesmoke: 0xf5f5f5ff, yellow: 0xffff00ff, yellowgreen: 0x9acd32ff, + /* spell-checker: enable */ }); // copied from react-native/Libraries/Components/View/ReactNativeStyleAttributes @@ -341,6 +343,7 @@ export const ColorProperties = makeShareable([ 'overlayColor', ]); +// ts-prune-ignoreExported for the purpose of tests only export function normalizeColor(color: unknown): number | null { 'worklet'; @@ -641,7 +644,7 @@ function processColorInitially(color: unknown): number | null | undefined { return null; } - normalizedColor = ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // argb + normalizedColor = ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // alpha rgb return normalizedColor; } @@ -688,7 +691,7 @@ export type ParsedColorArray = [number, number, number, number]; export function convertToRGBA(color: unknown): ParsedColorArray { 'worklet'; - const processedColor = processColorInitially(color)!; // argb; + const processedColor = processColorInitially(color)!; // alpha rgb; const a = (processedColor >>> 24) / 255; const r = ((processedColor << 8) >>> 24) / 255; const g = ((processedColor << 16) >>> 24) / 255;