(optionsNameMap, jsonOptions, basePath, defaultOptions, diagnostics, errors)
| 41871 | return convertOptionsFromJson(getCommandLineWatchOptionsMap(), jsonOptions, basePath, /*defaultOptions*/ undefined, watchOptionsDidYouMeanDiagnostics, errors); |
| 41872 | } |
| 41873 | function convertOptionsFromJson(optionsNameMap, jsonOptions, basePath, defaultOptions, diagnostics, errors) { |
| 41874 | if (!jsonOptions) { |
| 41875 | return; |
| 41876 | } |
| 41877 | for (var id in jsonOptions) { |
| 41878 | var opt = optionsNameMap.get(id); |
| 41879 | if (opt) { |
| 41880 | (defaultOptions || (defaultOptions = {}))[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); |
| 41881 | } |
| 41882 | else { |
| 41883 | errors.push(createUnknownOptionError(id, diagnostics, ts.createCompilerDiagnostic)); |
| 41884 | } |
| 41885 | } |
| 41886 | return defaultOptions; |
| 41887 | } |
| 41888 | /*@internal*/ |
| 41889 | function convertJsonOption(opt, value, basePath, errors) { |
| 41890 | if (isCompilerOptionsValue(opt, value)) { |
no test coverage detected