Property 'state' of type '{ [key: string]: MappingType; } | undefined' is not assignable to string index type 'string | number | MappingType'
See original GitHub issueIssue 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
:
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:
- Initialize a new react native typescript application by running
react-native init TempApp --template typescript
(assuming you have the react-native cli installed) - Follow the
react-native-ui-kitten
setup instructions from here - 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:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top 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 >
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 Free
Top 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
@artyorsh New versions work like a charm and I was able to remove that flag. Thanks again for your quick support! 💯
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.