feat: add support for TypeScript 3.1 (#26151)

PR Close #26151
This commit is contained in:
Igor Minar
2018-09-27 16:47:19 -07:00
committed by Alex Rickabaugh
parent f455518d80
commit 9993c72335
22 changed files with 34 additions and 136 deletions

View File

@ -74,8 +74,8 @@ export function createCustomEvent(doc: Document, name: string, detail: any): Cus
/**
* Check whether the input is an `Element`.
*/
export function isElement(node: Node): node is Element {
return node.nodeType === Node.ELEMENT_NODE;
export function isElement(node: Node | null): node is Element {
return !!node && node.nodeType === Node.ELEMENT_NODE;
}
/**