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

react-native Hermes enabled causing function expression to be wrong when converting it to string

$
0
0

I am trying to extract a property name from a generic expression.

Normally when using this code below works great.

class Test {  name: string;}const test = function<T>(item: ((x: T) => any) ) {  return item;} console.log(test<Test>(x=> x.name).toString()) // code above should show function(x) { return x.name};// then I could do substring "name"

but when I enable Hermes

I get function (a0) { [bytecode] } Which is not really what I want.

Is there a way to solve this? Or a setting I could Apply to hermes?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



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