@polymer/lit-element
Version:
Polymer based lit-html custom element
29 lines (23 loc) • 710 B
TypeScript
interface ShadyCSS {
styleElement(host: Element, overrideProps?: {[key: string]: string}): void;
getComputedStyleValue(element: Element, property: string): string;
ScopingShim: {prepareAdoptedCssText(cssText: string[], name: string): void;};
nativeShadow: boolean;
}
interface ShadyDOM {
inUse: boolean;
}
interface Window {
ShadyCSS?: ShadyCSS;
ShadyDOM?: ShadyDOM;
ShadowRoot: typeof ShadowRoot;
}
// Augment existing types with styling API
interface ShadowRoot {
adoptedStyleSheets: CSSStyleSheet[];
}
declare var ShadowRoot: {prototype: ShadowRoot; new () : ShadowRoot;}
interface CSSStyleSheet {
replaceSync(cssText: string): void;
replace(cssText: string): Promise<unknown>;
}