import * as ts from 'typescript' ; import { getJsxAttributesFromJsxElement , getStringLiteral } from '../JsxAttribute' ; const typeString = 'type' ; Returns function getImplicitRoleForMenuitem ( node ) { const typeAttribute = getJsxAttributesFromJsxElement ( node ) [ typeString ] ; if ( typeAttribute ) { const value = getStringLiteral ( typeAttribute ) || '' ; switch ( value . toUpperCase ( ) ) { case 'COMMAND' : return 'menuitem' ; case 'CHECKBOX' : return 'menuitemcheckbox' ; case 'RADIO' : return 'menuitemradio' ; default : return undefined ; } } return undefined ; } export { getImplicitRoleForMenuitem as menuitem } ;