import * as ts from 'typescript' ; import { getJsxAttributesFromJsxElement , getStringLiteral } from '../JsxAttribute' ; const altString = 'alt' ; Returns function getImplicitRoleForImg ( node ) { const alt = getJsxAttributesFromJsxElement ( node ) [ altString ] ; if ( alt && getStringLiteral ( alt ) ) { return 'img' ; } return 'presentation' ; } export { getImplicitRoleForImg as img } ;