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

Function sanitizeEventValue

packages/runtime-dom/src/modules/events.ts:154–163  ·  view source on GitHub ↗
(value: unknown, propName: string)

Source from the content-addressed store, hash-verified

152}
153
154function sanitizeEventValue(value: unknown, propName: string): EventValue {
155 if (isFunction(value) || isArray(value)) {
156 return value as EventValue
157 }
158 warn(
159 `Wrong type passed as event handler to ${propName} - did you forget @ or : ` +
160 `in front of your prop?\nExpected function or array of functions, received type ${typeof value}.`,
161 )
162 return NOOP
163}

Callers 1

patchEventFunction · 0.85

Calls 2

isFunctionFunction · 0.90
warnFunction · 0.90

Tested by

no test coverage detected