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

Function isCallOf

packages/compiler-sfc/src/script/utils.ts:41–54  ·  view source on GitHub ↗
(
  node: Node | null | undefined,
  test: string | ((id: string) => boolean) | null | undefined,
)

Source from the content-addressed store, hash-verified

39}
40
41export function isCallOf(
42 node: Node | null | undefined,
43 test: string | ((id: string) => boolean) | null | undefined,
44): node is CallExpression {
45 return !!(
46 node &&
47 test &&
48 node.type === 'CallExpression' &&
49 node.callee.type === 'Identifier' &&
50 (typeof test === 'string'
51 ? node.callee.name === test
52 : test(node.callee.name))
53 )
54}
55
56export function toRuntimeTypeString(types: string[]): string {
57 return types.length > 1 ? `[${types.join(', ')}]` : types[0]

Callers 11

walkDeclarationFunction · 0.90
canNeverBeRefFunction · 0.90
walkVariableDeclarationFunction · 0.90
checkUsageFunction · 0.90
processDefineSlotsFunction · 0.90
processDefineOptionsFunction · 0.90
processDefinePropsFunction · 0.90
processWithDefaultsFunction · 0.90
processDefineExposeFunction · 0.90
processDefineModelFunction · 0.90
processDefineEmitsFunction · 0.90

Calls 1

testFunction · 0.50

Tested by

no test coverage detected