Skip to content

Commit

Permalink
fix: Add null to return type for HTMLElement#querySelector (closes ta…
Browse files Browse the repository at this point in the history
  • Loading branch information
nonara committed Oct 3, 2021
1 parent 2593be5 commit b9b4bb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nodes/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ export default class HTMLElement extends Node {
/**
* Query CSS Selector to find matching node.
* @param {string} selector Simplified CSS selector
* @return {HTMLElement} matching node
* @return {(HTMLElement|null)} matching node
*/
public querySelector(selector: string) {
public querySelector(selector: string): HTMLElement | null {
return selectOne(selector, this as HTMLElement, {
xmlMode: true,
adapter: Matcher,
Expand Down

0 comments on commit b9b4bb2

Please sign in to comment.