TypeScript 7.1 Beta ships content mappers: type inference from markdown, vue and svelte files
mattpocockuk · x · 2026-10-23
- TypeScript 7.1 Beta is out (npm install -D typescript@beta), bringing a preview API, content mapper support, import-attribute improvements and optimizations.
- Matt Pocock highlights the standout feature: you can import non-TypeScript files (markdown, vue, svelte), write a content mapper to extract types from them, then run tsc --runExternalCode to get type inference from non-TS code.
- Simplest case: import a markdown file, add a bit of tsconfig config, run tsc with the new flag, and get fully typed frontmatter.
- 7.1 also adds Import Attributes support in ambient modules (e.g. with { type: "json" }).
More from coding & agent
- Dev Jokes: You Can Only Relax Using Claude on Stuff That Doesn't Matter — louisvarge · 2026-10-23
- PHP Has Been 'Dead' for 30 Years — and It's Still Not Dead — 0xkarasy · 2026-10-23
- VC: By 2027 companies won't be able to justify hiring non-agent engineers — latticecut · 2026-10-23
- Opus 5.5 codes an entire sci-fi movie title sequence—every frame and synthesized note — prasenx · 2026-10-23
- Local AI slide generation for privacy-constrained healthcare: HTML vs PPTX — AdRepulsive7837 · 2026-10-23
- MiniMax Design MCP goes live: create with Design inside Codex and other agents — Hailuo_AI · 2026-10-23