import * as ts from 'typescript' ; import { getJsxAttributesFromJsxElement , getStringLiteral } from '../JsxAttribute' ; const typeString = 'type' ; Returns function getImplicitRoleForMenu ( node ) { const typeAttribute = getJsxAttributesFromJsxElement ( node ) [ typeString ] ; if ( typeAttribute ) { const value = getStringLiteral ( typeAttribute ) || undefined ; return value && value . toUpperCase ( ) === 'TOOLBAR' ? 'toolbar' : undefined ; } return undefined ; } export { getImplicitRoleForMenu as menu } ;