interface OptiQuery {
(selector: T): HTMLElementOf | null
(selector: string): HTMLElement | null
all(selector: string): [HTMLElement, ...HTMLElement[]] | null;
assert(selector: string): (tag: T) => HTMLElementOf | null
query(): QueryBuilder;
tear(selector: T): HTMLElementOf | null;
tear(selector: string): HTMLElement;
explicit(selector: string): (tag: T) => HTMLElementOf | null;
with(selector: `${T}${string}`): HTMLElementOf | null;
with(selecor: string): HTMLElement | null;
}
interface OptiMultiQuery {
(selector: T): Collection>
(selector: string): Collection
all(selector: string): Collection<[HTMLElement, ...HTMLElement[]]>;
assert(selector: string): (tag: T) => Collection>
query(): QueryBuilder;
tear(selector: T): Collection>;
tear(selector: string): Collection;
explicit(selector: string): (tag: T) => Collection>;
live(selecor: T): LiveCollection>;
live(selecor: string): LiveCollection;
with(selector: `${T}${string}`): Collection>;
with(selecor: string): Collection;
}
interface LiveCollectionConstructor {
new(collection: T[]): LiveCollection
from(arrayLike: ArrayLike): LiveCollection
}
interface LiveCollection extends Collection {}
interface QueryBuilder {
is(selector: string): this
isnt(selector: string): this
}