Fix typo in diagnostic messages

This commit is contained in:
Sam Vervaeck 2023-04-12 21:39:06 +02:00
parent e7493d0d49
commit 94c9e83d06
Signed by: samvv
SSH key fingerprint: SHA256:dIg0ywU1OP+ZYifrYxy8c5esO72cIKB+4/9wkZj1VaY

View file

@ -361,17 +361,17 @@ export class ConsoleDiagnostics implements Diagnostics {
this.writer.indent();
if (diagnostic.missing !== null) {
this.writer.write(ANSI_FG_YELLOW + ANSI_BOLD + 'info: ' + ANSI_RESET);
this.writer.write(`field '${diagnostic.fieldName}' is missing in diagnostic construct\n\n`);
this.writer.write(`field '${diagnostic.fieldName}' is missing in this construct\n\n`);
this.writer.write(printNode(diagnostic.missing) + '\n');
}
if (diagnostic.present !== null) {
this.writer.write(ANSI_FG_YELLOW + ANSI_BOLD + 'info: ' + ANSI_RESET);
this.writer.write(`field '${diagnostic.fieldName}' is required in diagnostic construct\n\n`);
this.writer.write(`field '${diagnostic.fieldName}' is required in this construct\n\n`);
this.writer.write(printNode(diagnostic.present) + '\n');
}
if (diagnostic.cause !== null) {
this.writer.write(ANSI_FG_YELLOW + ANSI_BOLD + 'info: ' + ANSI_RESET);
this.writer.write(`because of a constraint on diagnostic node:\n\n`);
this.writer.write(`because of a constraint on this node:\n\n`);
this.writer.write(printNode(diagnostic.cause) + '\n');
}
this.writer.dedent();