MCPcopy Index your code
hub / github.com/nodejs/node / validateValue

Function validateValue

test/fixtures/snapshot/typescript.js:41108–41118  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

41106 }
41107 return undefined;
41108 function validateValue(value) {
41109 var _a;
41110 if (!invalidReported) {
41111 var diagnostic = (_a = option === null || option === void 0 ? void 0 : option.extraValidation) === null || _a === void 0 ? void 0 : _a.call(option, value);
41112 if (diagnostic) {
41113 errors.push(ts.createDiagnosticForNodeInSourceFile.apply(void 0, __spreadArray([sourceFile, valueExpression], diagnostic, false)));
41114 return undefined;
41115 }
41116 }
41117 return value;
41118 }
41119 function reportInvalidOptionValue(isError) {
41120 if (isError) {
41121 errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, option.name, getCompilerOptionValueTypeString(option)));

Callers 1

Calls 3

callMethod · 0.45
pushMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected