Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

TypeStat

> 编程语言
Open source

Converts JavaScript to TypeScript and TypeScript to better TypeScript.

2.3K stars0 likes0 views
WebsiteGitHub

About

Converts JavaScript to TypeScript and TypeScript to better TypeScript.

TypeStat

Converts JavaScript to TypeScript and TypeScript to better TypeScript.

<a href="#contributors" target="_blank"></a>


<a href="https://github.com/JoshuaKGoldberg/TypeStat/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"></a>
<a href="https://codecov.io/gh/JoshuaKGoldberg/TypeStat" target="_blank"></a>
<a href="https://github.com/JoshuaKGoldberg/TypeStat/blob/main/LICENSE.md" target="_blank"></a>
<a href="http://npmjs.com/package/typestat"></a>

Usage

TypeStat is a CLI utility that modifies TypeScript types in existing code. The built-in mutators will only ever add or remove types and will never change your runtime behavior. TypeStat can:

  • ✨ Convert JavaScript files to TypeScript in a single bound!
  • ✨ Add TypeScript types on files freshly converted from JavaScript to TypeScript!
  • ✨ Infer types to fix --noImplicitAny and --noImplicitThis violations!
  • ✨ Annotate missing nulls and undefineds to get you started with --strictNullChecks!

⚡ To start, the typestat command will launch an interactive guide to setting up a configuration file. ⚡

bash
npx typestat
bash
 Welcome to TypeStat! 
This will create a new typestat.json for you.
...

After, use typestat --config typestat.json to convert your files.

Configuration

To get a deeper understanding of TypeStat, read the following docs pages in order:

  1. Usage.md for an explanation of how TypeStat works
  2. Fixes.md for the type of fixes TypeStat will generate mutations for
  3. Cleanups.md for the post-fix cleaning TypeStat may apply to files
  4. Types.md for configuring how to work with types in mutations
  5. Filters.md for using tsquery to ignore sections of source files
  6. Custom Mutators.md for including or creating custom mutators

Development

See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md for general tooling documentation. For understanding the project, see ./docs in general, and especially ./docs/Architecture.md. Thanks!

Contributors


Beyang Liu


Daniel Stiner


Deleted user


Emerson


Girish Sontakke


Guten


Ibrahim H.


Josh Goldberg ✨


Loren Van Spronsen


Mark Molinaro


Nigel Gilbert


Peter A. Jonsson


ajitae


orionna319


rubiesonthesky

⚠️

This package is based on @JoshuaKGoldberg's TypeStat.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptconversionjavascriptmutationsstatic-analysis

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言