clarify why expected_diagostics isn't available to everyone
Someone was wondering why it had this whitelist, so add a bit
more info to the comment.
PiperOrigin-RevId: 296003095
diff --git a/internal/tsc_wrapped/tsc_wrapped.ts b/internal/tsc_wrapped/tsc_wrapped.ts
index 442ce6f..24e2e6e 100644
--- a/internal/tsc_wrapped/tsc_wrapped.ts
+++ b/internal/tsc_wrapped/tsc_wrapped.ts
@@ -286,7 +286,10 @@
return true;
}
-// We only allow our own code to use the expected_diagnostics attribute
+// We use the expected_diagnostics attribute for writing compilation tests.
+// We don't want to expose it to users as a general-purpose feature, because
+// we don't want users to end up using it like a fancy @ts-ignore.
+// So instead it's limited to a whitelist.
const expectDiagnosticsWhitelist: string[] = [
];