Add babel-macro
artalar opened this issue · 0 comments
artalar commented
The macro must wrap all the core types and add a possibility to call it with as a template strings.
import { t } from "@rtcad/macro";
const type1 = t.String` string description `
const type2 = t.Object` shape description `({ prop: t.Number })
/**
* COMPILE TO:
* 1) `const type1 = t.String`, `const type2 = t.Object({ prop: t.Number })`
* 2) File `out.md` with content `string description\n> string \n shape description\n>{ prop: number } \n`
*/