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.

Property 'state' of type '{ [key: string]: MappingType; } | undefined' is not assignable to string index type 'string | number | MappingType'

See original GitHub issue

Issue type

I’m submitting a … (check one with “x”)

  • bug report

Issue description

Current behavior: I’m attempting to use react-native-ui-kitten which uses @eva-design/eva and after I follow the setup instructions from here, my typescript build now fails due to a compilation error in schema.d.ts:

Capture

As a workaround, anyone using UI Kitten/Eva-Design with Typescript will have to toggle the skipLibCheck flag to true in their tsconfig.json.

Expected behavior: Importing @eva-design/eva should not break a tsc build

Steps to reproduce:

  1. Initialize a new react native typescript application by running react-native init TempApp --template typescript (assuming you have the react-native cli installed)
  2. Follow the react-native-ui-kitten setup instructions from here
  3. Run tsc -p ./tsconfig.json to execute the typescript build

Other information:

Package versions

@eva-design/eva: 1.0.0
react: 16.8.3
react-native: 0.59.8
react-native-ui-kitten: 4.0.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
techgermcommented, Jun 29, 2019

@artyorsh New versions work like a charm and I was able to remove that flag. Thanks again for your quick support! 💯

1reaction
32penkincommented, Jun 21, 2019

Hello @germanp173! Thank you for letting us know about such issues. Please try to update ‘react-native-ui-kitten’ package to the 4.0.3 version. I guess it was fixed in this release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript: Property 'formatName' of type '() => string' is not ...
However, no where in my code am I using “string|number”. This is the code in the interface file interfaces.ts: interface Person { name:...
Read more >
Built-in Types — Python 3.11.1 documentation
The following sections describe the standard types that are built into the interpreter. The principal built-in types are numerics, sequences, mappings, ...
Read more >
Elasticsearch Mapping Basics & Examples (After Create Index)
We can compare mapping to a database schema in how it describes the fields and properties that documents hold, the datatype of each...
Read more >
Documentation - Conditional Types - TypeScript
Create types which act like if statements in the type system.
Read more >
15 Typescript Mistakes To Avoid - SoftwareMill Tech Blog
someFn(a); // Argument of type 'unknown' is not assignable to parameter ... Conversion of type 'undefined' to type 'string' may be a mistake ......
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