Repository navigation
Description
Before submitting a new issue
- I tested using the latest version of the library, as the bug might be already fixed.
- I tested using a supported version of react native.
- I checked for possible duplicate issues, with possible answers.
Bug summary
react-native-css/types (the reference nativewind-env.d.ts adds) augments react-native with names and extends clauses that React Native 0.88's generated types no longer have, so a project that checks declarations (skipLibCheck: false) gets errors from it (types.d.ts at 811f357):
Touchableis no longer exported byreact-native.interface ScrollViewProps extends ViewProps, ScrollViewPropsIOS, ScrollViewPropsAndroid, Touchableclashes with 0.88's ownScrollViewProps, and theclassNamethe file adds toViewPropsandImagePropsBasemakesScrollViewProps,ImageBackgroundPropsandKeyboardAvoidingViewPropsunable to extend both of their bases.VirtualizedListPropsis no longer generic, soFlatListProps<ItemT> extends VirtualizedListProps<ItemT>fails.
Library version
0.0.0-nightly.811f357 (main at 811f357)
Environment info
System: MINGW64_NT-10.0-26300, node v26.12.1, npm 12.2.1, react-native-css 0.0.0-nightly.811f357, react-native 0.88.1, typescript 7.0.2Windows 11. No app or native build is involved: the errors come from the type check alone.
Steps to reproduce
The example has index.ts, which loads react-native-css/types and sets the props it adds (className on ViewProps, TextProps and ScrollViewProps, and contentContainerClassName), and control.ts, which loads react-native alone. Both are checked with strict and skipLibCheck: false.
git clone https://github.com/YevheniiKotyrlo/react-native-css-types-react-native-0-88 && cd react-native-css-types-react-native-0-88bash check.sh, which runsnpm ci --ignore-scripts, thentsc -p tsconfig.jsonandtsc -p tsconfig.control.json, and prints each error only the first program has.
Expected: loading react-native-css/types adds no error, and index.ts still type-checks with every className prop it sets.
Actual: it adds six errors, three in types.d.ts and three in React Native's declarations, where the added className clashes:
node_modules/react-native/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts(40,18): error TS2320: Interface 'KeyboardAvoidingViewProps' cannot simultaneously extend types 'Readon
node_modules/react-native/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts(634,18): error TS2320: Interface 'ScrollViewProps' cannot simultaneously extend types 'Readonly<Omit<Omit<View
node_modules/react-native/types_generated/Libraries/Image/ImageProps.d.ts(291,18): error TS2320: Interface 'ImageBackgroundProps' cannot simultaneously extend types 'Readonly<Omit<Omit<ImageProps, "ch
node_modules/react-native-css/types.d.ts(22,13): error TS2320: Interface 'ScrollViewProps' cannot simultaneously extend types 'Readonly<Omit<Omit<ViewProps, "experimental_accessibilityOrder">, "Sticky
node_modules/react-native-css/types.d.ts(29,42): error TS2315: Type 'VirtualizedListProps' is not generic.
node_modules/react-native-css/types.d.ts(6,3): error TS2305: Module '"react-native"' has no exported member 'Touchable'.
SUMMARY: defect: loading react-native-css/types adds 3 errors in react-native-css/types.d.ts and 3 in react-native's declarations
check.sh exits 1 while the defect shows and 0 once it is fixed.
Reproducible example repository
https://github.com/YevheniiKotyrlo/react-native-css-types-react-native-0-88
Activity
YevheniiKotyrlo commentedon Oct 30, 2026
This is the patch I apply to the published 3.1.0-rc.0 until a fix lands: it keeps every added
classNameproperty and drops theextendsclauses along with the imports they used, which React Native 0.88's types reject.dave-otf commentedon Oct 31, 2026
One diagnostic that may help separate the package augmentation from the app: run the repro once with
skipLibCheck: true. If the declaration diagnostics disappear, that confirms the failure is in.d.tschecking; it is only a temporary isolation step, not a compatibility fix, and it does not validate runtime behavior. Then keep theskipLibCheck: falserepro as the regression check for the eventual 0.88-compatible declarations.