This is the greatest tool I've ever found. But some types flaw with TypeScript.
Following methods in HTMLElement can return null, but do not declare correct return types.
getElementById
querySelector (in README only)
nextSibling
nextElementSibling
previousSibling
previousElementSibling
Following methods in HTMLElement can return undefined, but do not declare correct return types. Actually these should follow the web API and return null, but I did not change them to prevent breaking the backward compability.
Hi,
This is the greatest tool I've ever found. But some types flaw with TypeScript.
Following methods in
HTMLElement
can returnnull
, but do not declare correct return types.getElementById
querySelector
(in README only)nextSibling
nextElementSibling
previousSibling
previousElementSibling
Following methods in
HTMLElement
can returnundefined
, but do not declare correct return types. Actually these should follow the web API and returnnull
, but I did not change them to prevent breaking the backward compability.getAttribute
(in README and jsdocs only)firstChild
lastChild