book cover - the typescript compiler api by jason rametta

The TypeScript Compiler API Book

By Jason Rametta

Everything you need to know about the TypeScript Compiler API! Become an expert on TypeScript Code Generation, Abstract Syntax Trees (AST), and everything related to programmatic code manipulation!

We support Purchasing Power Parity (PPP). View the adjusted price during checkout depending on your location.

The Book πŸ“š

This eBook was written for software developers who are interested in learning more about TypeScript and its powerful compiler APIs. The TypeScript Compiler API is a feature-rich API available for automating code-related tasks, such as reading code, writing code, and extending TypeScript's built-in feature set.

If you want to learn how to:

  • Automate the generation of boilerplate code in your codebase.
  • Create custom linters to catch bugs and inconsistencies in your codebase faster.
  • Write more reliable code by eliminating a whole class of bugs.
  • Read and analyze code programatically to generate custom documentation or other formats of data.
  • Get a better understanding of the TypeScript internals.

Then this book is for you!

We will demystify the secrets of the TypeScript Abstract Syntax Tree and learn how to use it to our advantage! We will learn how to write linters, extend diagnostics, create custom logic for code validations at compile time, and most importantly - generate code automatically based on data and constraints.

Chapters πŸ“–

1. What is the Typescript Compiler API

A gentle introduction to everything the Typescript Compiler API provides

2. Overview of Abstract Syntax Trees

A brief overview of Abstract Syntax Trees (ASTs) and how to understand them

3. Transpiling Modules to Javascript

Understanding how to use the Compiler API to transpile TypeScript to JavaScript

4. Extracting data from the AST

Learn how to read and extract useful data from the TypeScript AST

5. Use cases for reading ASTs

Going over the most common use cases for reading and extracting AST data

6. Writing a TypeScript Linter

Learn how to write a custom TypeScript Linter from scratch!

7. Code Generation

Introduction to writing ASTs to accomplish automatic TypeScript code generation

8. Writing a TypeScript transformer

Learning how to rewrite the AST to create Babel-like transformers

9. Unit testing code generation

Strategies & tips for writing tests against code generation scripts

10. The Type Checker

Using the TypeScript Type Checker for more in-depth metadata

11. Leveraging A.I for code generation

Understanding how to leverage A.I LLM's to accomplish tasks faster

F.A.Q ❓

  1. How long is the book?

    The book has 11 full chapters, each chapter is around a 10-minute read.

  2. Do I need existing knowledge of TypeScript to read this book?

    No, although it would be helpful. Good knowledge of JavaScript is needed and just basic knowledge of TypeScript is ideal.

  3. How long do I have access to the eBook after purchase?

    Forever! You will never lose access to reading the book.

  4. Will I get access to free support?

    Yes! All purchases come with free unlimited support for answering extra questions about topics covered in the book. A contact form will be provided in the dashboard after purchase.

  5. Any location based discounts available?

    Yes! We support Purchasing Power Parity (PPP) and offer a discount between 20% and 60% off during checkout depending on your location! Discounts are sourced from the World Bank and are refreshed weekly.

The Author πŸ‘¨β€πŸ’»

headshot of the author Jason Rametta
My name is Jason Rametta and I'm a Software Developer from MontrΓ©al, Canada πŸ‡¨πŸ‡¦. I have a decade of experience writing all kinds of different types of software. I specialize in web technologies and have a deep understanding in topics such as React, Go, F#, TypeScript, API design, Functional Programming, Databases, and more!
I most recently worked at Unity3D as a Senior Software Developer working on User Generated Content for multiplayer games built with the Unity engine. Previously I worked at large eComms, Telecomms, startups for network broadcasting graphics, and inspection platforms for big pharmaceuticals.
When I'm not at my computer, I enjoy playing sports such as tennis 🎾 and yoga πŸ§˜β€β™‚οΈ. I also have hobbies in the fields of mead homebrewing, bread baking, wild mushroom hunting, hiking, and coffee tasting β˜•οΈ!