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 mappers: report a mapper's diagnostics without stopping type checking #65462
transform diagnostics are added to the virtual file's parse diagnostics (ParseResult in internal/contentmapper/transform.go), and tsc reports semantic diagnostics only when no file has a syntactic one. So one mapper diagnostic anywhere hides every type error in the project for that run.
Many mapper diagnostics aren't syntax errors. A mapper that types .sql files from a database reports column "emial" does not exist, and the virtual file it returns parses and checks fine.
A field on the diagnostic, say "phase": "semantic", could report it with the file's semantic diagnostics, the way an Expect directive's unused diagnostic already is.
tsc --noEmit prints only the SQL error. The src/main.ts error shows up on the next run, once the SQL is fixed.
A mapper can get this today by returning each error as an Expect diagnostic directive over an empty statement appended to its virtual text, with the error as the unused diagnostic. That works on 7.1.0-beta, but it uses directives for something they weren't made for.
💻 Use Cases
CI runs that print every error at once
Mappers whose errors are about meaning (unknown names, type mismatches) rather than syntax
interfaceTransformResultextendsMappedOutput{/** Parse errors in the original content. */diagnostics?: MapperDiagnostic[];
It's implemented the way it is specifically to discourage content mappers from doing semantic checks during transforming, which should be as fast as possible, with single-file context. What you're looking for is #45886. I think the existence of content mappers adds a good new reason to want an integration like that, but I'm not sure it needs to be content-mapper-specific.
Activity
andrewbranch commentedon Nov 13, 2026
This is super intentional and documented in microsoft/typescript-go#4712:
It's implemented the way it is specifically to discourage content mappers from doing semantic checks during transforming, which should be as fast as possible, with single-file context. What you're looking for is #45886. I think the existence of content mappers adds a good new reason to want an integration like that, but I'm not sure it needs to be content-mapper-specific.
colinhacks commentedon Nov 14, 2026
Understood, thanks 👍