select-dom
Advanced tools
Comparing version 9.0.0 to 9.0.1
@@ -8,4 +8,4 @@ import type { ParseSelector } from 'typed-query-selector/parser.js'; | ||
*/ | ||
declare function $<Selector extends string, Selected extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | Selector[], baseElement?: ParentNode): Selected | undefined; | ||
declare function $<Selected extends Element = HTMLElement>(selectors: string | string[], baseElement?: ParentNode): Selected | undefined; | ||
declare function $<Selector extends string, Selected extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | readonly Selector[], baseElement?: ParentNode): Selected | undefined; | ||
declare function $<Selected extends Element = HTMLElement>(selectors: string | readonly string[], baseElement?: ParentNode): Selected | undefined; | ||
export declare class ElementNotFoundError extends Error { | ||
@@ -19,4 +19,4 @@ name: string; | ||
*/ | ||
declare function expectElement<Selector extends string, Selected extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | Selector[], baseElement?: ParentNode): Selected; | ||
declare function expectElement<Selected extends Element = HTMLElement>(selectors: string | string[], baseElement?: ParentNode): Selected; | ||
declare function expectElement<Selector extends string, Selected extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | readonly Selector[], baseElement?: ParentNode): Selected; | ||
declare function expectElement<Selected extends Element = HTMLElement>(selectors: string | readonly string[], baseElement?: ParentNode): Selected; | ||
/** | ||
@@ -27,4 +27,4 @@ * @param selectors One or more CSS selectors separated by commas | ||
*/ | ||
declare function lastElement<Selector extends string, Selected extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | Selector[], baseElement?: ParentNode): Selected | undefined; | ||
declare function lastElement<Selected extends Element = HTMLElement>(selectors: string | string[], baseElement?: ParentNode): Selected | undefined; | ||
declare function lastElement<Selector extends string, Selected extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | readonly Selector[], baseElement?: ParentNode): Selected | undefined; | ||
declare function lastElement<Selected extends Element = HTMLElement>(selectors: string | readonly string[], baseElement?: ParentNode): Selected | undefined; | ||
/** | ||
@@ -35,3 +35,3 @@ * @param selectors One or more CSS selectors separated by commas | ||
*/ | ||
declare function elementExists(selectors: string | string[], baseElement?: ParentNode): boolean; | ||
declare function elementExists(selectors: string | readonly string[], baseElement?: ParentNode): boolean; | ||
/** | ||
@@ -42,4 +42,4 @@ * @param selectors One or more CSS selectors separated by commas | ||
*/ | ||
declare function $$<Selector extends string, Selected extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | Selector[], baseElements?: BaseElements): Selected[]; | ||
declare function $$<Selected extends Element = HTMLElement>(selectors: string | string[], baseElements?: BaseElements): Selected[]; | ||
declare function $$<Selector extends string, Selected extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | readonly Selector[], baseElements?: BaseElements): Selected[]; | ||
declare function $$<Selected extends Element = HTMLElement>(selectors: string | readonly string[], baseElements?: BaseElements): Selected[]; | ||
export { $, $$, lastElement, elementExists, expectElement }; |
{ | ||
"name": "select-dom", | ||
"version": "9.0.0", | ||
"version": "9.0.1", | ||
"description": "Extra lightweight DOM selector helper", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
9991