Skip to content
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ const SCALE_FACTOR_WITH_DIMENSION_VALUE = (
};

const DEFAULT_SCALE_FACTOR_WITH_NUMERIC_VALUE = (
val: NonNullable<AnimatableNumericValue | undefined>,
): NonNullable<AnimatableNumericValue | undefined> => {
val: NonNullable<AnimatableNumericValue | string | undefined>,
): NonNullable<AnimatableNumericValue | string | undefined> => {
return typeof val === 'number' ? DEFAULT_SCALE_FACTOR(val) : val;
};

const preProcessor: Partial<StylePreprocessor> = {
'fontSize': DEFAULT_SCALE_FACTOR,
'lineHeight': DEFAULT_SCALE_FACTOR,
//@ts-ignore
Copy link

Copilot AI May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding an explanatory comment alongside //@ts-ignore to clarify the specific React Native compatibility issue being addressed.

Suggested change
//@ts-ignore
// @ts-ignore: React Native's type definitions do not fully align with the expected type for 'borderRadius'.

Copilot uses AI. Check for mistakes.
'borderRadius': DEFAULT_SCALE_FACTOR_WITH_NUMERIC_VALUE,
'minWidth': SCALE_FACTOR_WITH_DIMENSION_VALUE,
'maxWidth': SCALE_FACTOR_WITH_DIMENSION_VALUE,
Expand Down