You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I don't think allowing comments inside JSON files is a good idea, even though it might be helpful. Ditching the official standard just so that we have some local improvements is usually a bad idea.
It seems like comments cannot be used currently (i.e. input is expected to be a "valid" JSON), looking at (in this file):
Looking at this example, I think the
parseConfigFileTextToJson
function might be useful here to allow comments insidetsconfig.json
.Do you have any advice on how to enable comments in the config file? Happy to open a PR in the compiler repo.
The text was updated successfully, but these errors were encountered: