element-vir
Version:
Heroic. Reactive. Declarative. Type safe. Web components without compromise.
28 lines (27 loc) • 964 B
TypeScript
import { type ElementPartInfo, type PartInfo } from '../../lit-exports/all-lit-exports.js';
/**
* The full type for `ElementPartInfo` because `lit`'s built-in type leaves out of most of its
* interface.
*
* @category Internal
*/
export type FullElementPartInfo = ElementPartInfo /** For some reason these aren't defined in lit's types already, even though they _do_ exist. */ & {
element: Element;
options: {
host: Element;
renderBefore: Element;
isConnected: boolean;
};
};
/**
* Extracts the element from the given part info. Used in lit directives.
*
* @category Internal
*/
export declare function extractElement(partInfo: PartInfo, directiveName: string): Element;
/**
* Asserts that the given part info is an instance of {@link FullElementPartInfo}.
*
* @category Internal
*/
export declare function assertIsElementPartInfo(partInfo: PartInfo, directiveName: string): asserts partInfo is FullElementPartInfo;