Type script errors
See original GitHub issueCurrent behaviour
I created a react native app then added typescript then added react-native-paper and added PaperProvider to the index.
Get errors after running
yarn tsc
Sample errors:
node_modules/react-native-paper/lib/typescript/src/components/Badge.d.ts:64:59 - error TS2344: Type '"visible" | "size" | "style" | "ref" | "children" | "key" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | ... 26 more ... | "textBreakStrategy"' does not satisfy the constraint '"visible" | "size" | "style" | "ref" | "children" | "theme"'.
Type '"key"' is not assignable to type '"visible" | "size" | "style" | "ref" | "children" | "theme"'.
Expected behaviour
No errors
Code sample
https://github.com/jauggy/ReactNativeDemo
What have you tried
I’m not sure what I should do to fix the problem.
Your Environment
software | version |
---|---|
ios or android | |
react-native | 0.63.2 |
react-native-paper | 4.0.1 |
node | |
npm or yarn | yarn version 1.22.4 |
expo sdk |
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Documentation - Understanding Errors - TypeScript
Whenever TypeScript finds an error, it tries to explain what went wrong in as much detail as possible. Because its type system is...
Read more >TypeScript errors and how to fix them
TypeScript errors and how to fix them. Common Errors. Below you find a list of common TypeScript errors along with the buggy code...
Read more >Interpreting Errors - TypeScript Deep Dive - Gitbook
Since TypeScript is a heavily focused Developer Help oriented programming language, its errors messages try to be super helpful when something goes wrong....
Read more >Common TypeScript errors and how to fix them - Payton.Codes
Finding and reading TypeScript errors · Handling falsy variables · Something is not a string · Incorrect inference from JavaScript · Using Array....
Read more >Improving TypeScript error handling with exhaustive type ...
Discover an improved method for handling errors in TypeScript that solves problems that arise from returning null and throwing try...catch.
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
@jauggy try upgrading @types/react-native from 0.63.4 to 0.63.6 and the issue will be resolved. I have verified the same in your repo.
Make sure you have latest version of
@types/react-native