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

Typing out all possible strings to use accessibilityRole?

$
0
0

I'm using accessibilityRole in React Native. Do I have to type out all the possible strings, or is there an import that I can use?

createAccessibilityRole(parent: Element): string {  if(isLink) return 'link'  return 'text'}

Obviously the above doesn't work, so I was wondering if we could import the type class or if we have to code it ourselves?


Viewing all articles
Browse latest Browse all 6215

Trending Articles



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