MCPcopy
hub / github.com/vuejs/core / createElementWithCodegen

Function createElementWithCodegen

packages/compiler-core/__tests__/testUtils.ts:51–80  ·  view source on GitHub ↗
(
  tag: VNodeCall['tag'],
  props?: VNodeCall['props'],
  children?: VNodeCall['children'],
  patchFlag?: VNodeCall['patchFlag'],
  dynamicProps?: VNodeCall['dynamicProps'],
)

Source from the content-addressed store, hash-verified

49}
50
51export function createElementWithCodegen(
52 tag: VNodeCall['tag'],
53 props?: VNodeCall['props'],
54 children?: VNodeCall['children'],
55 patchFlag?: VNodeCall['patchFlag'],
56 dynamicProps?: VNodeCall['dynamicProps'],
57): ElementNode {
58 return {
59 type: NodeTypes.ELEMENT,
60 loc: locStub,
61 ns: Namespaces.HTML,
62 tag: 'div',
63 tagType: ElementTypes.ELEMENT,
64 props: [],
65 children: [],
66 codegenNode: {
67 type: NodeTypes.VNODE_CALL,
68 tag,
69 props,
70 children,
71 patchFlag,
72 dynamicProps,
73 directives: undefined,
74 isBlock: false,
75 disableTracking: false,
76 isComponent: false,
77 loc: locStub,
78 },
79 }
80}
81
82type Flags = PatchFlags | ShapeFlags
83export function genFlagText(

Callers 1

codegen.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected