export interface RendererNode { [key: string]: any; } export interface RendererElement extends RendererNode { } export type VNodeProps = { key?: string | number | symbol; ref_for?: boolean; ref_key?: string; }; export type VNodeNormalizedChildren = string | VNodeArrayChildren | null; export interface VNode { /** * @internal */ __v_isVNode: true; /** * @internal */ type: VNodeTypes; props: (VNodeProps & ExtraProps) | null; key: string | number | symbol | null; /** * SFC only. This is assigned on vnode creation using currentScopeId * which is set alongside currentRenderingInstance. */ scopeId: string | null; /** * SFC only. This is assigned to: * - Slot fragment vnodes with :slotted SFC styles. * - Component vnodes (during patch/hydration) so that its root node can * inherit the component's slotScopeIds * @internal */ slotScopeIds: string[] | null; children: VNodeNormalizedChildren; component: null; el: HostNode | null; anchor: HostNode | null; target: HostElement | null; targetAnchor: HostNode | null; /** * number of elements contained in a static vnode * @internal */ staticCount: number; /** * @internal */ ssContent: VNode | null; /** * @internal */ ssFallback: VNode | null; shapeFlag: number; patchFlag: number; /** * @internal */ dynamicProps: string[] | null; /** * @internal */ dynamicChildren: VNode[] | null; /** * @internal lexical scope owner instance */ ctx: null; /** * @internal attached by v-memo */ memo?: any[]; /** * @internal __COMPAT__ only */ isCompatRoot?: true; /** * @internal custom element interception hook */ ce?: (instance: null) => void; } type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void; export type VNodeArrayChildren = Array; export type VNodeChild = VNodeChildAtom | VNodeArrayChildren; export declare const enum ShapeFlags { ELEMENT = 1, FUNCTIONAL_COMPONENT = 2, STATEFUL_COMPONENT = 4, TEXT_CHILDREN = 8, ARRAY_CHILDREN = 16, SLOTS_CHILDREN = 32, TELEPORT = 64, SUSPENSE = 128, COMPONENT_SHOULD_KEEP_ALIVE = 256, COMPONENT_KEPT_ALIVE = 512, COMPONENT = 6 } export type VNodeTypes = string | VNode | typeof Text | typeof Static | typeof Comment | typeof Fragment; export declare function isSameVNodeType(n1: VNode, n2: VNode): boolean; export declare const Fragment: { new (): { $props: VNodeProps; }; __isFragment: true; }; export type Data = Record; export declare const Text: unique symbol; export declare const Comment: unique symbol; export declare const Static: unique symbol; export declare let currentScopeId: string | null; export declare let currentRenderingInstance: null; export declare function normalizeChildren(vnode: VNode, children: unknown): void; export declare function createTextVNode(text?: string, flag?: number): VNode; declare function createBaseVNode(type: VNodeTypes, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode; export { createBaseVNode as createElementVNode }; export declare const createVNode: typeof _createVNode; declare function _createVNode(type: VNodeTypes, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode; export declare function normalizeVNode(child: VNodeChild): VNode; export declare function mergeProps(...args: (Data & VNodeProps)[]): Data; export declare function cloneVNode(vnode: VNode, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean): VNode; export declare function cloneIfMounted(child: VNode): any;