What happened?
Opting a project into React Native's Strict TypeScript API ("customConditions": ["react-native", "react-native-strict-api"]) makes every Uniwind className / *ClassName prop a type error — Property 'className' does not exist on type … on View, Text, Pressable, and the rest of the core components. In our app (Expo SDK 57 / RN 0.86.2) that's 341 errors across essentially every screen; the minimal repro below shows it with a single View + Text.
Mechanism: the strict tree (react-native/types_generated/) exports ViewProps, TextProps, etc. as generated type aliases (Readonly<Omit<…>>), while uniwind/types.d.ts adds its props via declare module 'react-native' interface merging into those names. An interface can't merge into a type alias, so the augmentation becomes an orphan interface and the props silently vanish — silently because skipLibCheck suppresses the collision inside the .d.ts. It's the same failure mode #627 described and fixed for VirtualizedListWithoutRenderItemProps, but affecting the whole core-component surface.
This gets urgent with RN 0.87, where the strict tree becomes the served default (react-native-legacy-deep-imports opt-out lasts through 0.88, with legacy types slated for removal after).
Steps to Reproduce
npm install in the repro repo
npm run typecheck → 2 × TS2322 Property 'className' does not exist
- Remove
"react-native-strict-api" from customConditions in tsconfig.json, run npm run typecheck again → passes
Snack or Repository Link
https://github.com/Quraian/uniwind-strict-api-repro
Uniwind version
1.11.0
React Native Version
0.86.2 (repro also holds against 0.87, where strict is the default)
Platforms
iOS, Android (type-level — platform-independent)
Expo
Yes
Additional information
What happened?
Opting a project into React Native's Strict TypeScript API (
"customConditions": ["react-native", "react-native-strict-api"]) makes every UniwindclassName/*ClassNameprop a type error —Property 'className' does not exist on type …onView,Text,Pressable, and the rest of the core components. In our app (Expo SDK 57 / RN 0.86.2) that's 341 errors across essentially every screen; the minimal repro below shows it with a singleView+Text.Mechanism: the strict tree (
react-native/types_generated/) exportsViewProps,TextProps, etc. as generated type aliases (Readonly<Omit<…>>), whileuniwind/types.d.tsadds its props viadeclare module 'react-native'interface merging into those names. An interface can't merge into a type alias, so the augmentation becomes an orphan interface and the props silently vanish — silently becauseskipLibChecksuppresses the collision inside the.d.ts. It's the same failure mode #627 described and fixed forVirtualizedListWithoutRenderItemProps, but affecting the whole core-component surface.This gets urgent with RN 0.87, where the strict tree becomes the served default (
react-native-legacy-deep-importsopt-out lasts through 0.88, with legacy types slated for removal after).Steps to Reproduce
npm installin the repro reponpm run typecheck→ 2 × TS2322Property 'className' does not exist"react-native-strict-api"fromcustomConditionsintsconfig.json, runnpm run typecheckagain → passesSnack or Repository Link
https://github.com/Quraian/uniwind-strict-api-repro
Uniwind version
1.11.0
React Native Version
0.86.2 (repro also holds against 0.87, where strict is the default)
Platforms
iOS, Android (type-level — platform-independent)
Expo
Yes
Additional information