refactor(platform-browser): compatibility with typescript strict flag (#30993)

As part of FW-1265, the `@angular/platform-browser` package is made compatible
with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html)

PR Close #30993
This commit is contained in:
Paul Gschwendtner
2019-06-13 20:14:00 +02:00
committed by Miško Hevery
parent 5bd12c5aa1
commit 18f0c2f1d4
2 changed files with 10 additions and 8 deletions

View File

@ -63,9 +63,9 @@ const _chromeNumKeyPadMap = {
'\x90': 'NumLock'
};
const nodeContains: (a: any, b: any) => boolean = (() => {
const nodeContains: (this: Node, other: Node) => boolean = (() => {
if (global['Node']) {
return global['Node'].prototype.contains || function(node: any) {
return global['Node'].prototype.contains || function(this: Node, node: any) {
return !!(this.compareDocumentPosition(node) & 16);
};
}