JoshuaKGoldberg

JoshuaKGoldberg/TypeStat

TypeScript MIT Dev Tools

Converts JavaScript to TypeScript and TypeScript to better TypeScript. 🧫

2.3k stars
42 forks
active
GitHub

2.3k

Stars

42

Forks

85

Open issues

14

Contributors

0.8.17 17 Feb 2025

AI Analysis

TypeStat is a CLI tool that automatically converts JavaScript to TypeScript and refines existing TypeScript code by adding type annotations, inferring types to satisfy strict compiler flags, and applying intelligent mutations. It's specialized for teams migrating to TypeScript or tightening type safety in existing codebases; not a general-purpose linter or formatter.

Dev Tools CLI Tool Discovery value: 6/10
Documentation 9/10
Activity 9/10
Community 8/10
Code quality 8/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

typescript-migration static-analysis type-inference ast-transformation cli-tool
Actively maintained Well documented MIT licensed Niche/specialized use case Production ready
Deep Analysis · Based on README and public signals
2d ago

CLI tool for automated TypeScript migration and type inference, serving gradual adoption workflows

TypeStat is a command-line utility designed to automate the conversion of JavaScript to TypeScript and incrementally add type annotations to existing TypeScript code. Built by Joshua K. Goldberg and maintained by a small core team, it targets developers migrating legacy codebases or progressively enabling strict TypeScript checks. The tool operates through configurable mutators that add or remove type annotations without changing runtime behavior. Adoption appears concentrated among teams performing large-scale JS-to-TS migrations rather than as a general-purpose TypeScript tooling staple.

Origin

TypeStat was created in November 2018 as TypeScript adoption was accelerating across the ecosystem. It emerged as a specialized tooling response to the practical pain of migrating large JavaScript codebases to TypeScript—a problem without an obvious dominant solution at the time. Development has been steady and incremental rather than explosive.

Growth

The project has maintained a modest but consistent trajectory: 2,251 stars accumulated over ~7.5 years (average ~300 stars/year), with 42 forks and 15 named contributors. Recent activity (1 star in last 7 days as of 2026-07-09, push on 2026-07-08) shows ongoing maintenance rather than rapid growth. Growth appears driven by organic discovery within the TypeScript migration niche rather than viral adoption or major ecosystem events.

In production

Adoption not verified. No case studies, production testimonials, or named organization deployments are mentioned in README or evident from metadata. The tool exists on npm (typestat package confirmed), but real-world usage scale remains undocumented. Similar tools like airbnb/ts-migrate (5617 stars, publicly associated with Airbnb's migration) have explicit organizational backing; TypeStat's adoption story appears more organic and opaque.

Code analysis
Architecture

Based on README, TypeStat operates as a mutator-based AST transformation engine that reads TypeScript/JavaScript source, applies configurable fixes and cleanups, and outputs modified files. Architecture appears modular, with support for custom mutators and filtering via tsquery. Documentation indicates deep configurability around type inference strategies and file-level transformations.

Tests

README explicitly badges codecov coverage, indicating test infrastructure is in place and monitored. Specific coverage percentage not disclosed in README excerpt provided, but presence of coverage badge suggests mature testing discipline.

Maintenance

Last push 2026-07-08 (1 day before evaluation date) indicates active maintenance. README references comprehensive documentation (Usage.md, Fixes.md, Cleanups.md, Types.md, Filters.md, Custom Mutators.md, Architecture.md), contributing guidelines, and code of conduct—signals of organized, intentional stewardship. Small contributor count (15) and low recent star velocity suggest maintenance is driven by core maintainer(s) rather than a large ecosystem.

Honest verdict

ADOPT IF: your team is performing a planned, large-scale JavaScript-to-TypeScript migration and needs configurable, non-breaking type inference automation; you have capacity to configure and potentially customize mutators. AVOID IF: you need a tool with extensive real-world case studies and broad ecosystem validation, or if your migration is small enough to handle manually or with simpler approaches. MONITOR IF: you are evaluating multiple migration strategies and want to assess TypeStat's ecosystem maturity over the next 12-18 months; current adoption data is limited, making it a reasonable option to pilot but not a proven standard.

Independent dimensions

Mainstream potential

3/10

Technical importance

6/10

Adoption evidence

2/10

Risks
  • Adoption appears limited to a niche audience; lack of public case studies means integration quality and real-world outcomes are not well-documented.
  • Small core contributor base (15 credited) may create sustainability concerns if key maintainers deprioritize or depart; no evidence of organizational backing.
  • Configurability and custom mutator support may impose higher learning curve and operational overhead compared to simpler, turnkey migration tools.
  • TypeScript ecosystem evolves rapidly; tool must track TypeScript compiler changes, type system expansions, and new language features—maintenance burden is ongoing.
  • Limited mainstream adoption means fewer community-shared configurations, fewer solved edge cases, and fewer third-party plugins compared to higher-adoption alternatives.
Prediction

TypeStat will likely remain a specialized, well-maintained tool for teams undertaking deliberate large-scale migrations rather than becoming a mainstream ecosystem standard. Continued steady maintenance and incremental feature additions are probable, but breakthrough adoption growth is unlikely without significant external validation (e.g., endorsement from major frameworks or enterprises) or integration into higher-level toolchains.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

TypeScript
98.7%
JavaScript
1.3%
SCSS
0%

Information

Language
TypeScript
License
MIT
Last updated
8h ago
Created
93mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

microsoft

microsoft/TypeScript

TypeScript is a statically typed superset of JavaScript maintained by Microsoft...

109.7k TypeScript Dev Tools
airbnb

airbnb/ts-migrate

ts-migrate is a tool that automates the conversion of JavaScript projects to...

5.6k TypeScript Dev Tools
TypeScriptToLua

TypeScriptToLua/TypeScriptToLua

TypeScriptToLua is a TypeScript-to-Lua transpiler that enables developers to...

2.5k TypeScript Dev Tools
dsherret

dsherret/ts-morph

ts-morph is a TypeScript Compiler API wrapper that simplifies programmatic...

6.1k TypeScript Dev Tools
glideapps

glideapps/quicktype

quicktype generates strongly-typed models and serializers from JSON, JSON...

13.8k TypeScript Dev Tools
vs. alternatives
airbnb/ts-migrate

ts-migrate is a more widely adopted (5617 stars) alternative with explicit Airbnb backing. It specifically targets JavaScript-to-TypeScript migration at scale. TypeStat appears to address a similar problem space but with lower visibility and narrower documented uptake.

dsherret/ts-morph

ts-morph (6126 stars) is a lower-level AST manipulation library, not a migration CLI. TypeStat is built at a higher level for end-user workflows; ts-morph is a foundation layer for tool builders.

glideapps/quicktype

quicktype (13782 stars) generates types from schema definitions or samples; it solves a different problem (type generation) rather than code-level migration and inference.

TypeScriptToLua/TypeScriptToLua

TSToLua (2522 stars) transpiles TypeScript to Lua; entirely different target domain, not a direct competitor.

microsoft/TypeScript

TypeScript itself (109k+ stars) is the foundation. TypeStat is a downstream automation layer, not a replacement or direct competitor—it depends on TypeScript's type system.