hast-util-select
Version:
hast utility for `querySelector`, `querySelectorAll`, and `matches`
18 lines • 473 B
TypeScript
/**
* @import {AstId} from 'css-selector-parser'
* @import {Element} from 'hast'
*/
/**
* Check whether an element has an ID.
*
* @param {AstId} query
* AST rule (with `ids`).
* @param {Element} element
* Element.
* @returns {boolean}
* Whether `element` matches `query`.
*/
export function id(query: AstId, element: Element): boolean;
import type { AstId } from 'css-selector-parser';
import type { Element } from 'hast';
//# sourceMappingURL=id.d.ts.map