Menu

TypeScript 7.1's Content Mappers Actually Work — I Type-Checked a Real .vue File in 3 Tries
📰

TypeScript 7.1's Content Mappers Actually Work — I Type-Checked a Real .vue File in 3 Tries

DEV Community: vue·AheadKit·2 days ago
#citOEAPY
#devtovue#devto#dev#mapper#beta
Reading 0:00
15s threshold

TypeScript 7.1 is supposed to land its release candidate today, November 10. The headline feature for anyone who writes Vue, Svelte, Astro, or MDX is content mappers: a plug-in point that lets TypeScript understand files that embed TypeScript inside another format, and map errors back to the right line in the original file.

The announcement post from October 20 says the example mapper package, @vue/content-mapper , is "not currently on npm." So I went to find out what's actually true on the morning of the RC: install the beta, write a real .vue file with a real type error in it, and see what happens.

Try 1: install the beta, check what version that even is

npm install -D typescript@beta ./node_modules/.bin/tsc --version # Version 7.1.0-beta

Enter fullscreen mode

Exit fullscreen mode

That was the first surprise. On the morning of November 10, typescript@beta still resolves to 7.1.0-beta — the same beta from October 20.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.