@lwc/engine-server
Version:
Renders LWC components in a server environment.
58 lines (57 loc) • 1.98 kB
TypeScript
import { WireContextSubscriptionCallback } from '@lwc/engine-core';
export declare const HostNamespaceKey: unique symbol;
export declare const HostTypeKey: unique symbol;
export declare const HostParentKey: unique symbol;
export declare const HostShadowRootKey: unique symbol;
export declare const HostChildrenKey: unique symbol;
export declare const HostAttributesKey: unique symbol;
export declare const HostValueKey: unique symbol;
export declare const HostHostKey: unique symbol;
export declare const HostContextProvidersKey: unique symbol;
export declare enum HostNodeType {
Text = "text",
Comment = "comment",
Raw = "raw",
Element = "element",
ShadowRoot = "shadow-root"
}
export interface HostText {
[HostTypeKey]: HostNodeType.Text;
[HostParentKey]: HostElement | null;
[HostValueKey]: string;
}
export interface HostComment {
[HostTypeKey]: HostNodeType.Comment;
[HostParentKey]: HostElement | null;
[HostValueKey]: string;
}
export interface HostRaw {
[HostTypeKey]: HostNodeType.Raw;
[HostParentKey]: HostElement | null;
[HostValueKey]: string;
}
export interface HostAttribute {
name: string;
[HostNamespaceKey]: string | null;
value: string;
}
export type HostParentNode = HostElement | HostShadowRoot;
export interface HostShadowRoot {
[HostTypeKey]: HostNodeType.ShadowRoot;
[HostChildrenKey]: HostChildNode[];
mode: 'open' | 'closed';
delegatesFocus: boolean;
[HostHostKey]: HostElement;
}
export interface HostElement {
[HostTypeKey]: HostNodeType.Element;
tagName: string;
[HostNamespaceKey]: string;
[HostParentKey]: HostParentNode | null;
[HostShadowRootKey]: HostShadowRoot | null;
[HostChildrenKey]: HostChildNode[];
[HostAttributesKey]: HostAttribute[];
[HostContextProvidersKey]: Map<string, WireContextSubscriptionCallback>;
}
export type HostNode = HostText | HostElement | HostComment;
export type HostChildNode = HostNode | HostRaw;