import { Role } from "@siteimprove/alfa-aria" ; import { Element } from "@siteimprove/alfa-dom" ; import { Predicate } from "@siteimprove/alfa-predicate" ; const { equals , property } = Predicate ; export function hasImplicitRole ( predicate ? ) ; export function hasImplicitRole < N extends Role . Name > ( name , ... rest ) ; export function hasImplicitRole ( nameOrPredicate , ... names ) { let predicate ; if ( typeof nameOrPredicate === "function" ) { predicate = nameOrPredicate ; } else { predicate = property ( "name" , equals ( nameOrPredicate , ... names ) ) ; } return ( element ) => Role . fromImplicit ( element ) . some ( predicate ) ; }