From 43f1c63fb920d0f750226f2e567e03e4dcba7a79 Mon Sep 17 00:00:00 2001 From: Westbrook Johnson Date: Fri, 10 Dec 2021 09:03:59 -0500 Subject: [PATCH] fix: use local declaration of ShadowRoot.adoptedStyleSheets --- packages/theme/src/Theme.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/theme/src/Theme.ts b/packages/theme/src/Theme.ts index 8737e3720f..75248efbf3 100644 --- a/packages/theme/src/Theme.ts +++ b/packages/theme/src/Theme.ts @@ -36,11 +36,12 @@ declare global { }; }; } - interface ShadowRoot { - adoptedStyleSheets?: CSSStyleSheet[]; - } } +type ShadowRootWithAdoptedStyleSheets = HTMLElement['shadowRoot'] & { + adoptedStyleSheets?: CSSStyleSheet[]; +}; + type FragmentType = 'color' | 'scale' | 'core' | 'app'; type SettableFragmentTypes = 'color' | 'scale'; type FragmentMap = Map; @@ -106,7 +107,7 @@ export class Theme extends HTMLElement implements ThemeKindProvider { } } - public shadowRoot!: ShadowRoot; + public shadowRoot!: ShadowRootWithAdoptedStyleSheets; private _color: Color | '' = '';