Typing out all possible strings to use accessibilityRole?

Viewed 111

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?

1 Answers
Related