import { SELECTOR_TYPE } from "../constants" ; import { SelectorData } from "../interfaces/result" ; import { getUniqueScore } from "..//utils.ts" ; param htmlNode param target return export const getIDSelectors = ( htmlNode , target ) : SelectorData [ ] => { const elementId = htmlNode . id ; if ( ! elementId ) return [ ] ; const querySelector = `#${ elementId }` ; const uniquenessScore = getUniqueScore ( querySelector , target ) ; return [ { type : SELECTOR_TYPE . ID , value : querySelector , uniquenessScore , } , ] ; } ;