diff --git a/types/webcomponents.js/index.d.ts b/types/webcomponents.js/index.d.ts index b7dcff5248..36a42dd00e 100644 --- a/types/webcomponents.js/index.d.ts +++ b/types/webcomponents.js/index.d.ts @@ -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 { diff --git a/types/webcomponents.js/tsconfig.json b/types/webcomponents.js/tsconfig.json index 7905e2ea0d..612875df12 100644 --- a/types/webcomponents.js/tsconfig.json +++ b/types/webcomponents.js/tsconfig.json @@ -6,8 +6,8 @@ "dom" ], "noImplicitAny": true, - "noImplicitThis": false, - "strictNullChecks": false, + "noImplicitThis": true, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/webcomponents.js/webcomponents.js-tests.ts b/types/webcomponents.js/webcomponents.js-tests.ts index 2ed224ef23..8fb40bd824 100644 --- a/types/webcomponents.js/webcomponents.js-tests.ts +++ b/types/webcomponents.js/webcomponents.js-tests.ts @@ -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;