Skip to content

Commit

Permalink
fix: use local declaration of ShadowRoot.adoptedStyleSheets
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Dec 10, 2021
1 parent a3e4aea commit 43f1c63
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/theme/src/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, { name: string; styles: CSSResultGroup }>;
Expand Down Expand Up @@ -106,7 +107,7 @@ export class Theme extends HTMLElement implements ThemeKindProvider {
}
}

public shadowRoot!: ShadowRoot;
public shadowRoot!: ShadowRootWithAdoptedStyleSheets;

private _color: Color | '' = '';

Expand Down

0 comments on commit 43f1c63

Please sign in to comment.