Open
Description
It seems like comments cannot be used currently (i.e. input is expected to be a "valid" JSON), looking at (in this file):
function convertCompilerOptionsOrThrow(options) {
if (!options) return null;
var result = ts.convertCompilerOptionsFromJson(options, '');
if (result.errors && result.errors.length) {
throw new Error(result.errors[0].messageText);
}
return result.options;
}
Looking at this example, I think the parseConfigFileTextToJson
function might be useful here to allow comments inside tsconfig.json
.
Do you have any advice on how to enable comments in the config file? Happy to open a PR in the compiler repo.