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

Function processDefineExpose

packages/compiler-sfc/src/script/defineExpose.ts:7–19  ·  view source on GitHub ↗
(
  ctx: ScriptCompileContext,
  node: Node,
)

Source from the content-addressed store, hash-verified

5export const DEFINE_EXPOSE = 'defineExpose'
6
7export function processDefineExpose(
8 ctx: ScriptCompileContext,
9 node: Node,
10): boolean {
11 if (isCallOf(node, DEFINE_EXPOSE)) {
12 if (ctx.hasDefineExposeCall) {
13 ctx.error(`duplicate ${DEFINE_EXPOSE}() call`, node)
14 }
15 ctx.hasDefineExposeCall = true
16 return true
17 }
18 return false
19}

Callers 1

compileScriptFunction · 0.90

Calls 2

isCallOfFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected