Skip to content

Correct StyleProp type for image style to improve type safety#435

Merged
duguyihou merged 2 commits into
duguyihou:mainfrom
AtomicRhombus:patch-1
Feb 8, 2026
Merged

Correct StyleProp type for image style to improve type safety#435
duguyihou merged 2 commits into
duguyihou:mainfrom
AtomicRhombus:patch-1

Conversation

@AtomicRhombus

Copy link
Copy Markdown
Contributor

🚨 Bug Fix

Corrected the style prop type in TurboImageProps from StyleProp<ImageStyle> to StyleProp<ViewStyle> to address a critical bug that could compromise type safety and component styling.

🔍 Motivation

The previous type definition incorrectly used ImageStyle, which could lead to type mismatches and potential runtime errors when applying styles to the image component.

💡 Changes

  • Updated style prop type from StyleProp<ImageStyle> to StyleProp<ViewStyle>
  • Ensures type compatibility with React Native's view styling system

🚀 Impact

  • Resolved critical type safety issue
  • More consistent with React Native component styling patterns
  • Prevents potential type-related compilation errors

✅ Testing

  • Verified type compatibility
  • Ensured no breaking changes in existing style applications

Signed-off-by: Little Meow <atoms-rhombus.3n@icloud.com>
Non AI

Signed-off-by: Little Meow <atoms-rhombus.3n@icloud.com>
@duguyihou duguyihou merged commit e3f5600 into duguyihou:main Feb 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants