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

Function formatTraceEntry

packages/runtime-core/src/warning.ts:119–132  ·  view source on GitHub ↗
({ vnode, recurseCount }: TraceEntry)

Source from the content-addressed store, hash-verified

117}
118
119function formatTraceEntry({ vnode, recurseCount }: TraceEntry): any[] {
120 const postfix =
121 recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``
122 const isRoot = vnode.component ? vnode.component.parent == null : false
123 const open = ` at <${formatComponentName(
124 vnode.component,
125 vnode.type,
126 isRoot,
127 )}`
128 const close = `>` + postfix
129 return vnode.props
130 ? [open, ...formatProps(vnode.props), close]
131 : [open + close]
132}
133
134function formatProps(props: Data): any[] {
135 const res: any[] = []

Callers 1

formatTraceFunction · 0.85

Calls 2

formatComponentNameFunction · 0.90
formatPropsFunction · 0.85

Tested by

no test coverage detected