---
title: "Discussion on \"Writing a TypeScript Code Generator: Templates vs AST\" | Hashnode"
description: "Discussion on \"Writing a TypeScript Code Generator: Templates vs AST\". Code generators replace mindless coding with productivity; a pure function that produces predictable code, given a (set of) input(s). Generating boilerplate classes or templates — a common use case for Codegen.\nUse-case: Generating Classes\nWe will be..."
url: "https://hashnode.com/posts/writing-a-typescript-code-generator-templates-vs-ast/65d3735ea4e9da71b80a101d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Writing a TypeScript Code Generator: Templates vs AST](https://blog.adhikary.net/writing-a-typescript-code-generator-templates-vs-ast?utm_source=hashnode&utm_medium=feed)

Code generators replace mindless coding with productivity; a pure function that produces predictable code, given a (set of) input(s). Generating boilerplate classes or templates — a common use case for Codegen. Use-case: Generating Classes We will be...

Sep 30, 2023 · 4 min read · blog.adhikary.net  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#ast](https://hashnode.com/tag/ast)

## Written by

[Aniruddha Adhikary](https://hashnode.com/@tuxboy)

@tuxboy · Singapore

  
[View profile](https://hashnode.com/@tuxboy)

Engineering Public Good and Human Welfare

A Software Engineer passionate about public good projects and making technology to serve society en masse.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
