UNPKG

377 BPlain TextView Raw
1import * as ts from 'typescript';
2import { getJsxAttributesFromJsxElement } from '../JsxAttribute';
3
4const hrefString: string = 'href';
5
6/**
7 * @Returns the implicit role for an area tag.
8 */
9function getImplicitRoleForArea(node: ts.Node): string {
10 return getJsxAttributesFromJsxElement(node)[hrefString] ? 'link' : undefined;
11}
12
13export { getImplicitRoleForArea as area };