HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dsherret
ts-morph
TypeScript2021–2026
dsherret / ts-morph

ts-morph

TypeScript Compiler API wrapper for static analysis and programmatic code changes.

4Distinct people
5Mentions
0Explicit recommenders
6.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

TypeScript Compiler API wrapper for static analysis and programmatic code changes.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year5 dated mentions

Observed mentions: 2021-05-25 20:02:55 UTC to 2026-04-08 16:18:31 UTC.

0122021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC211
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

5 sources
I don't see anything wrong that would disqualify your plan. But if the alternative is regex, and you're writing already in TypeScript, you may take a look at ts-morph [0]. TS has very good compiler APIs and that gets you something much safer than text-based replacement while still staying relatively small for a constrained subset. ts-morph wraps those APIs cleanly. Btw, JS doesn't even have an official bytecode. The spec is defined at the language semantics level, so each engine/toolchain invents its own internal representation. [0] https://github.com/dsherret/ts-morph
In JSIR: A High-Level IR for JavaScript

Show HN: I built an AI agent that upgrades NPM packages

Hi HN, I built a tool [1] that resolves breaking changes when you upgrade npm packages. I know keeping my dependencies updated is good hygiene but I really have no motivations to do them. The time to fix breaking changes then validate them makes the ROI lopsided. Automating these helps me reduce the barrier to a good habit. It works on typescript and tsx projects. BYOK (bring your own GPT-4 key) for the codegen. MIT license. How does it work? - Bumps the package version, builds your project, and then runs tsc over your project to understand what breaks - Uses ts-morph [2] to create an AST of your code to understand the relationships between code blocks - Uses the AST to get type definitions for external methods to understand how to use the new package - Creates a DAG to execute coding tasks in the correct order to handle propagating chang
Read the rest
5 points · Open discussion
We used tsoa where i work but had issues with complex types [0] so one of our dev rewrote a simpler implementation [1] that use ts-morph [2] under the hood. Not exactly related but we had issues with the official openapi generated so he also wrote a package to codegen typescript client from an openapi file [3] [0]: https://github.com/lukeautry/tsoa/pulls?q=is%3Apr+sort%3Aupd... [1]: https://github.com/Eywek/typoa [2]: https://github.com/dsherret/ts-morph [3]: https://github.com/Eywek/oatyp
In Ask HN: Node.js API Documentation

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.