Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

How to assign 'any' type to a object property in realm schema in react native?

$
0
0

I have an api response which is coming based on fieldType, so I can not give any particular type to schema.
response type 1 (fieldType = polygon):

[[[11.4354534,73.23423],[11.4354534,73.23423],[11.4354534,73.23423]...]]

response type 2(fieldType = line):

[[11.4354534,73.23423],[11.4354534,73.23423],[11.4354534,73.23423]...]

Now I want to assign above response type to schema COORDINATES , but as we do not have any fixed type of response , I am planning to assign type any to the schema.

Schema:

const FieldSchemaNames = { .........  COORDINATES:'any', ........};

but here any is not working . Do we have any types for schema.

any type - Whatever value we will assign to that attribute , it will accept-.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>