types.d.ts doesn't type-check against React Native 0.88: Touchable, ScrollViewProps and VirtualizedListProps
Los mantenedores suelen responder en 12 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react-native, typescript
- Área
- mobile-dev
Línea de trabajo
Empieza desde types.d.ts (líneas 1-30) donde Touchable, ScrollViewProps y VirtualizedListProps están augmented. Comprueba los tipos de React Native 0.88 para ver exports/generics eliminados, luego corrige las cláusulas extends. Hecho cuando npx tsc en el repro repo no reporta errores de react-native-css/types.d.ts.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 2421ea7):
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.2421ea7 (main at 2421ea77da52), 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.jsonwithreact-native0.88.1 andreact-native-css0.0.0-nightly.2421ea7, atsconfig.jsonwithstrictandskipLibCheck: false, and anindex.tsholding onlyimport type {} from 'react-native-css/types';. npm install --ignore-scriptsnpx 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 ...
Reproducible example repository
https://github.com/YevheniiKotyrlo/react-native-css-types-react-native-0-88
- Lenguaje dominante
- TypeScript
- Estrellas
- 166
- Forks
- 45
- Merge medio
- 17 d 22 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nativewind/react-native-css
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
nativewind/react-native-css#554 ·
Los mantenedores suelen responder en 12 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
nativewind/react-native-css#549 · 2 comentarios ·
Los mantenedores suelen responder en 12 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nativewind/react-native-css#545 ·
Los mantenedores suelen responder en 12 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nativewind/react-native-css#544 ·
Los mantenedores suelen responder en 12 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nativewind/react-native-css#543 ·
Los mantenedores suelen responder en 12 días
Todos los issues de nativewind/react-native-css
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
JuliusBrussee/caveman#1449 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
linagora/twake-calendar-frontend#1924 ·
Los mantenedores suelen responder en 1 día
-
Add: Class TV ModaAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
libnativeapi/nativeapi#21 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
GiganticMinecraft/seichi-playguide#183 ·
Los mantenedores suelen responder en 1 día