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
{{ message }}
Repository navigation
Content mapper ignore directives need diagnostic-code selectors #65516
A mapped diagnostic ignore directive currently selects diagnostics by generated range and policy only. Framework-generated code can place an excess-property diagnostic (TS2353) in a range that also contains unrelated assignability, event, slot, accessibility, or nested object-literal diagnostics. A range-only ignore therefore cannot suppress the intended framework compatibility diagnostic without hiding real errors.
Advertise diagnosticDirectiveCodeSelectors in host initialize.params.capabilities.
When advertised, interpret an ignore tuple optional sixth element as a TypeScript diagnostic code.
Keep legacy five-element ignores and expect tuples byte-for-byte unchanged.
Filter only when both the virtual range and diagnostic code match.
This makes unsupported hosts safe: a mapper does not emit the selected tuple unless the host explicitly advertises support, so it never degrades to range-only suppression.
If this is primarily about excess property checking, why not change the code generation to include an index signature?
I'm torn on this. The use case here is pretty reasonable, but this functionality would make it really easy for any content mapper to disable, file-wide if desired, any TypeScript error they want, which makes me a little uneasy.
Activity
andrewbranch commentedon Nov 20, 2026
If this is primarily about excess property checking, why not change the code generation to include an index signature?
I'm torn on this. The use case here is pretty reasonable, but this functionality would make it really easy for any content mapper to disable, file-wide if desired, any TypeScript error they want, which makes me a little uneasy.