ListItem: Typescript error with @types/react-native >= 0.65.7
See original GitHub issueExplain what you did (Required)
Upgraded @types/react-native
to version 0.65.8
Expected behavior (Required)
No type errors happen
Describe the bug (Required)
I am now getting this typescript error:
error TS2739: Type '{ children: Element[]; bottomDivider: boolean; disabled: boolean | undefined; onPress: (() => void)
| undefined; }' is missing the following properties from type 'Pick<TouchableHighlightProps & { containerStyle?:
StyleProp<ViewStyle>; disabledStyle?: StyleProp<ViewStyle>; ... 6 more ...; children?: any; } & Partial<...>,
"children" | ... 45 more ... | "bottomDivider">': hasTVPreferredFocus, tvParallaxProperties
20 <ListItem
~~~~~~~~
This is probably caused by the change in this PR: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56374 (worked with 0.65.6, error appeared with 0.65.7).
To Reproduce (Required)
Just use a simple <ListItem>
in a RN project with Typescript.
Screenshots (Required)
Not required here
Your Environment (Required):
software | version |
---|---|
react-native-elements | 3.4.2 |
react-native | 0.66.1 |
@types/react-native | 0.65.8 |
Issue Analytics
- State:
- Created 2 years ago
- Reactions:17
- Comments:14
Top Results From Across the Web
React Typescript prop error in ListItem (Material UI component)
I'm having an issue with the ContainerComponent and ContainerProps, i think the problem is that "li" is of type string, ...
Read more >TypeScript errors and how to fix them
Below you find a list of common TypeScript errors along with the buggy code and its fixed version. If you're interested in more...
Read more >ListItem: Typescript error with @types/react-native >= 0.65.7
Just use a simple <ListItem> in a RN project with Typescript. Screenshots (Required). Not required here. Your Environment (Required):. software, version ...
Read more >ListItem: Typescript error with @types/react-native >= 0.65.7
Just use a simple <ListItem> in a RN project with Typescript. Screenshots (Required). Not required here. Your Environment (Required):. software, version ...
Read more >TypeScript: is it possible to see errors not in one line?
To modify error messages, you either need to configure or improve the ... the Quickfix API ( :help quickfix-functions ) to modify the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like the DefinitelyTyped fix is merged, can we cut a new release to incorporate the change so our typescript doesn’t make us add a bunch of
everywhere?
@renchap I’m still putting out fires at work due to this log4j thing. But I’ll see if I can do a quick release sometime this week.