MCPcopy Create free account
hub / github.com/Snapchat/Valdi / throwInvalidType

Function throwInvalidType

valdi/src/valdi/runtime/JavaScript/JavaScriptUtils.cpp:436–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434};
435
436void throwInvalidType(IJavaScriptContext& jsContext,
437 const JSValue& jsValue,
438 JSExceptionTracker& exceptionTracker,
439 ValueType expectedType) {
440 exceptionTracker.onError(Value::invalidTypeError(expectedType, jsContext.getValueType(jsValue)));
441}
442
443Value untypedJsObjectToValue(IJavaScriptContext& jsContext,
444 const JSValue& jsValue,

Callers 1

jsValueToFunctionFunction · 0.85

Calls 2

onErrorMethod · 0.65
getValueTypeMethod · 0.45

Tested by

no test coverage detected