You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
types.d.ts doesn't type-check against React Native 0.88: Touchable, ScrollViewProps and VirtualizedListProps #548
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 2421ea7):
Touchable is no longer exported by react-native.
interface ScrollViewProps extends ViewProps, ScrollViewPropsIOS, ScrollViewPropsAndroid, Touchable clashes with 0.88's own ScrollViewProps, and the className the file adds to ViewProps and ImagePropsBase makes ScrollViewProps, ImageBackgroundProps and KeyboardAvoidingViewProps unable to extend both of their bases.
VirtualizedListProps is no longer generic, so FlatListProps<ItemT> extends VirtualizedListProps<ItemT> fails.
Library version
0.0.0-nightly.2421ea7 (main at 2421ea7), and 3.1.0-rc.0
Environment info
Windows 11 10.0.26300, Node 26.12.1, npm 12.2.1, TypeScript 7.0.2, react-native 0.88.1, react 19.3.1, @types/react 19.3.0.
No app or native build is involved: the errors come from the type check alone.
Steps to reproduce
Clone the reproducible example: a package.json with react-native 0.88.1 and react-native-css 0.0.0-nightly.2421ea7, a tsconfig.json with strict and skipLibCheck: false, and an index.ts holding only import type {} from 'react-native-css/types';.
npm install --ignore-scripts
npx tsc -p .
Expected: no error from react-native-css/types.d.ts.
Actual, among the output (the run also prints a few errors of React Native's own declarations, which are separate):
node_modules/react-native-css/types.d.ts(6,3): error TS2305: Module '"react-native"' has no exported member 'Touchable'.
node_modules/react-native-css/types.d.ts(22,13): error TS2320: Interface 'ScrollViewProps' cannot simultaneously extend types 'Readonly<Omit<Omit<ViewProps, "experimental_accessibilityOrder">, "StickyHeaderComponent" | "alwaysBounceHorizontal" | "alwaysBounceVertical" | "automaticallyAdjustContentInsets" | ... 62 more ... | "zoomScale"> & Omit<...> & Omit<...> & Omit<...>>' and 'ViewProps'.
node_modules/react-native-css/types.d.ts(29,42): error TS2315: Type 'VirtualizedListProps' is not generic.
node_modules/react-native/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts(40,18): error TS2320: Interface 'KeyboardAvoidingViewProps' cannot simultaneously extend types ...
Named property 'className' of types ...
node_modules/react-native/types_generated/Libraries/Image/ImageProps.d.ts(291,18): error TS2320: Interface 'ImageBackgroundProps' cannot simultaneously extend types ...
Named property 'className' of types ...
This is the patch I apply to the published 3.1.0-rc.0 until a fix lands: it keeps every added className property and drops the extends clauses along with the imports they used, which React Native 0.88's types reject.
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.ts checking; it is only a temporary isolation step, not a compatibility fix, and it does not validate runtime behavior. Then keep the skipLibCheck: false repro as the regression check for the eventual 0.88-compatible declarations.
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.