(opt, value, basePath, errors)
| 41887 | } |
| 41888 | /*@internal*/ |
| 41889 | function convertJsonOption(opt, value, basePath, errors) { |
| 41890 | if (isCompilerOptionsValue(opt, value)) { |
| 41891 | var optType = opt.type; |
| 41892 | if (optType === "list" && ts.isArray(value)) { |
| 41893 | return convertJsonOptionOfListType(opt, value, basePath, errors); |
| 41894 | } |
| 41895 | else if (!ts.isString(optType)) { |
| 41896 | return convertJsonOptionOfCustomType(opt, value, errors); |
| 41897 | } |
| 41898 | var validatedValue = validateJsonOptionValue(opt, value, errors); |
| 41899 | return isNullOrUndefined(validatedValue) ? validatedValue : normalizeNonListOptionValue(opt, basePath, validatedValue); |
| 41900 | } |
| 41901 | else { |
| 41902 | errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, getCompilerOptionValueTypeString(opt))); |
| 41903 | } |
| 41904 | } |
| 41905 | ts.convertJsonOption = convertJsonOption; |
| 41906 | function normalizeOptionValue(option, basePath, value) { |
| 41907 | if (isNullOrUndefined(value)) |
no test coverage detected