Repository navigation
Content mapper docs - #65582
Content mapper docs#65582Gabriela Araujo Britto (gabritto) wants to merge 9 commits into
Conversation
Andrew Branch (andrewbranch)
left a comment
There was a problem hiding this comment.
Thank you so much for doing this! I feel so much better about my odds of getting everything done by our release 😄
One additional short section in the implementation doc should be about compatibility:
- The protocol will only change in backward-compatible ways after 7.1 is officially released. New features may be added with an LSP-like capabilities negotiation in
initialize. - For forward compatibility, tuples should be considered open-ended. A mapper should not assert an exact tuple length or read elements beyond ones it knows how to handle.
| } | ||
| ``` | ||
|
|
||
| This is useful when the original content mapped files will be emitted to a different format, rather than left as-is. |
There was a problem hiding this comment.
I think it's useful for understanding output extensions, but I wouldn't want to get into details here. We could either revisit output extensions with a bit more detail in the emit section, and add the diagram, or add that to your PR, which I link to.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved documentation errors in compiler prerequisites, STDIO framing, request handling, position mapping, and the public API property name can cause configuration failures, stalled cleanup, or incorrect mapper implementations.
5 open issues
Require rewriteRelativeImportExtensions for the .gts to .js mapping · New Document required Content-Length framing for STDIO · New Document that closeProject requests require a response · New Correct the direction of request and result position mapping · New Use the public supplementalSourceFileNames property · New
What changed in this PR
This documentation-only PR explains how content mappers integrate specialized file formats with TypeScript’s compiler and language server.
Changes:
- Introduces mapper configuration, file inclusion, and CLI/editor support.
- Documents implementation protocols, span mappings, diagnostics, compilation, and API integration.
- Adds diagrams illustrating atom, verbatim, and alias mappings.
| File | Description |
|---|---|
docs/content_mappers/intro_content_mappers.md |
Getting-started guide for configuring and using content mappers. |
docs/content_mappers/impl_content_mappers.md |
Implementation guide covering protocols and compiler/editor integration. |
docs/content_mappers/add-span-mappings.svg |
Illustrates atom and verbatim mappings and diagnostic locations. |
docs/content_mappers/add-span-mappings-alias.svg |
Illustrates alias mappings and diagnostic name substitution. |
Review effort: Balanced

No description provided.