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

Function isCompilerOptionsValue

test/fixtures/snapshot/typescript.js:41136–41147  ·  view source on GitHub ↗
(option, value)

Source from the content-addressed store, hash-verified

41134 ts.isString(option.type) ? option.type : "string";
41135 }
41136 function isCompilerOptionsValue(option, value) {
41137 if (option) {
41138 if (isNullOrUndefined(value))
41139 return true; // All options are undefinable/nullable
41140 if (option.type === "list") {
41141 return ts.isArray(value);
41142 }
41143 var expectedType = ts.isString(option.type) ? option.type : "string";
41144 return typeof value === expectedType;
41145 }
41146 return false;
41147 }
41148 /**
41149 * Generate an uncommented, complete tsconfig for use with "--showConfig"
41150 * @param configParseResult options to be generated into tsconfig.json

Callers 2

_loop_4Function · 0.85
convertJsonOptionFunction · 0.85

Calls 1

isNullOrUndefinedFunction · 0.85

Tested by

no test coverage detected