question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type script errors

See original GitHub issue

Current 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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
contactsimonwilsoncommented, Aug 24, 2020

@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.

1reaction
raajnadarcommented, Aug 3, 2020

Make sure you have latest version of @types/react-native

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found