Skip to content

Commit 2b65583

Browse files
nonaraRon S
authored and
Ron S
committed
fix: Add null to return type for HTMLElement#querySelector (closes #157)
1 parent 6823349 commit 2b65583

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nodes/html.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ export default class HTMLElement extends Node {
521521
/**
522522
* Query CSS Selector to find matching node.
523523
* @param {string} selector Simplified CSS selector
524-
* @return {HTMLElement} matching node
524+
* @return {(HTMLElement|null)} matching node
525525
*/
526-
public querySelector(selector: string) {
526+
public querySelector(selector: string): HTMLElement | null {
527527
return selectOne(selector, this as HTMLElement, {
528528
xmlMode: true,
529529
adapter: Matcher,

0 commit comments

Comments
 (0)