TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Simple approach to meta programming in TypeScript

2 pointsby aabbcc1241about 3 years ago

1 comment

aabbcc1241about 3 years ago
Compared to other works, this is a simple and flexible approach. The construct is based on string so it should be easy to get started. No need to deal with complex AST structures. The macro scripts is type-checked and generated code can be type-checked in separate step. This seems the sweet spot between flexibility and simplicity.<p>Just released v1 (semver will be followed :)