Skip to content
Merged
Changes from all commits
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 : Ensure compatibility with all supported React Native versions
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 expanding the @ts-ignore comment to reference the relevant React Native version or commit for clarity and future maintainability.

Suggested change
//@ts-ignore : Ensure compatibility with all supported React Native versions
//@ts-ignore: Required for compatibility with React Native version >=0.65 due to changes in StyleSheet types. See https://github.com/facebook/react-native/commit/<commit-hash>.

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