TypeScript introduced the new content mapper API in microsoft/typescript-go#4712. This will be released in TypeScript 7.1. I built mdx-content-mapper as a proof of concept and to provide feedback to the TypeScript team. I took the Volar based MDX virtual content from this repo, and iterated on top of that. I would say it’s already more stable and more feature complete than we ever had in mdx-analyzer.
We can actually use content mappers with tsc, which is a much requested feature and also really convenient for testing. 😄
I intend to incorporate the content mapper inside the mdx-analyzer repo as the @mdx-js/content-mapper package. I intend to do this following a couple of steps, where the first ones involve the removal of TypeScript support based on Volar. I do want to keep Volar and the language server to support editor features provided by vscode-markdown-languageservice.
Considering microsoft/TypeScript#63703, I believe it will be nice if @mdx-js/content-mapper and our VSCode extension are released alongside TypeScript 7.1 RC. During the 7.1 Beta period, users can try mdx-content-mapper instead.
TypeScript introduced the new content mapper API in microsoft/typescript-go#4712. This will be released in TypeScript 7.1. I built
mdx-content-mapperas a proof of concept and to provide feedback to the TypeScript team. I took the Volar based MDX virtual content from this repo, and iterated on top of that. I would say it’s already more stable and more feature complete than we ever had inmdx-analyzer.We can actually use content mappers with
tsc, which is a much requested feature and also really convenient for testing. 😄I intend to incorporate the content mapper inside the
mdx-analyzerrepo as the@mdx-js/content-mapperpackage. I intend to do this following a couple of steps, where the first ones involve the removal of TypeScript support based on Volar. I do want to keep Volar and the language server to support editor features provided byvscode-markdown-languageservice.@mdx-js/typescript-pluginfrom the project. It will no longer be supported. I do not feel the need to deprecate this yet. People may still want to use this in web projects with TypeScript 6 until TypeScript 7 can be used in the browser with a content mapper.@mdx-js/language-server.@mdx-js/language-service. Most logic in this project currently involves TypeScript support.@mdx-js/language-serverontsconfig.json. It currently reads remark plugins from this file. We can hardcode sane defaults, or make it configurable using settings if this turns out necessary. This only affects what we pass tovscode-markdown-languageservice.@mdx-js/content-mapperinto themdx-analyzerrepository.@mdx-js/content-mappersupport to the VSCode extension.Considering microsoft/TypeScript#63703, I believe it will be nice if
@mdx-js/content-mapperand our VSCode extension are released alongside TypeScript 7.1 RC. During the 7.1 Beta period, users can trymdx-content-mapperinstead.