Sébastien Rigaux

Motherload imports typed YAML, JSONC, CSV and Markdown into TypeScript

View resource

motherload.dev

Motherload lets you import data files as TypeScript modules typed from their contents. It supports TOML, YAML, JSONC, JSON5, CSV, TSV, Markdown, plain text and .env files; types appear in the editor, and tsc reports parsing errors with their locations.

Type-checking uses TypeScript 7.1 content mappers, currently in beta, and requires --runExternalCode. At runtime, a preload or plugin adapts the same imports for Node.js and a range of bundlers.

Motherload graphic with the text “Import data files into TypeScript, fully typed” on the left and TypeScript code importing plans.toml, team.yaml, strings.jsonc, posts.csv, notes.md and .env on the right.