webcomponents.js: Fix compatibility with lib.dom (#27796)

This commit is contained in:
Andy
2018-08-02 11:55:39 -07:00
committed by GitHub
parent 811f840c45
commit 48ebc7e7c7
3 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ export interface Polyfill {
declare global {
// This contains duplicates of some types in lib.dom.d.ts in order to support typescript 2.0
interface ElementDefinitionOptions {
extends: string;
extends?: string;
}
interface ShadowRoot extends DocumentFragment {

View File

@@ -6,8 +6,8 @@
"dom"
],
"noImplicitAny": true,
"noImplicitThis": false,
"strictNullChecks": false,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [

View File

@@ -16,7 +16,7 @@ const XFoo = document.registerElement("x-foo", {
const xFoo = new XFoo();
xFoo.textContent = "";
document.body.appendChild(xFoo);
document.body!.appendChild(xFoo);
window.CustomElements.hasNative;
window.CustomElements.flags;