import { Fragment, Text, Comment, createBlock, openBlock, createCommentVNode, isVNode, camelize, } from 'vue' import { hasOwn } from '../objects' import { debugWarn } from '../error' import type { VNode, VNodeChild, VNodeNormalizedChildren } from 'vue' const SCOPE = 'utils/vue/vnode' export enum PatchFlags { TEXT = 1, CLASS = 2, STYLE = 4, PROPS = 8, FULL_PROPS = 16, HYDRATE_EVENTS = 32, STABLE_FRAGMENT = 64, KEYED_FRAGMENT = 128, UNKEYED_FRAGMENT = 256, NEED_PATCH = 512, DYNAMIC_SLOTS = 1024, HOISTED = -1, BAIL = -2, } export function isFragment(node: VNode): boolean export function isFragment(node: unknown): node is VNode export function isFragment(node: unknown): node is VNode { return isVNode(node) && node.type === Fragment } export function isText(node: VNode): boolean export function isText(node: unknown): node is VNode export function isText(node: unknown): node is VNode { return isVNode(node) && node.type === Text } export function isComment(node: VNode): boolean export function isComment(node: unknown): node is VNode export function isComment(node: unknown): node is VNode { return isVNode(node) && node.type === Comment } const TEMPLATE = 'template' export function isTemplate(node: VNode): boolean export function isTemplate(node: unknown): node is VNode export function isTemplate(node: unknown): node is VNode { return isVNode(node) && node.type === TEMPLATE } /** * determine if the element is a valid element type rather than fragments and comment e.g.