debugging of tsc errors

This commit is contained in:
2023-03-05 02:27:15 +01:00
parent 77c3b90d02
commit 1906ac1981
2 changed files with 12 additions and 5 deletions

View File

@@ -21,12 +21,12 @@ export const qs = (
selector: string | keyof HTMLElementTagNameMap,
parent = document
): Element => {
return parent.querySelector(selector)
return parent.querySelector(selector) as unknown as Element
}
export const qsa = (
selector: string | keyof HTMLElementTagNameMap,
parent = document
): Element[] => {
return [...parent.querySelectorAll(selector)]
): NodeListOf<Element> => {
return parent.querySelectorAll(selector)
}