I've been following the development of Content Mappers in TypeScript for quite a while.
Partly because I'm excited about what they make possible, but also because I've been working on another TypeScript extension project that relies heavily on Volar.js .
And God, that's a lot of code to maintain just to get all the language features working correctly and keep everything in sync with TypeScript.
But with TypeScript 7.1 , we finally have an official extension mechanism built directly into the compiler.
And I think this opens up some pretty interesting possibilities.
What if TypeScript could import anything?
Imagine being able to write something like this:
import { Rows , Columns } from " ./data.csv " ; import { exif } from " ./photo.jpeg " ; import { config } from " ./config.yml " ;
Enter fullscreen mode
Exit fullscreen mode
And not just import these files as strings or any , but have TypeScript actually understand their contents.
Imagine getting autocomplete for your YAML configuration, properly…