Need help with TypeStat?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

JoshuaKGoldberg
133 Stars 3 Forks MIT License 988 Commits 59 Opened issues

Description

Converts JavaScript to TypeScript and TypeScript to better TypeScript.

Services available

!
?

Need anything else?

Contributors list

# 92
netlify
TypeScr...
GraphQL
angular...
432 commits
# 10,759
TypeScr...
React
vscode
monaco-...
323 commits
# 3,157
imagema...
sass-fr...
splash
pipelin...
1 commit

TypeStat

Code Style: Prettier TypeScript: Strict Circle CI Join the chat at https://gitter.im/TypeStat/community NPM version

Converts JavaScript to TypeScript and TypeScript to better TypeScript.

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. ⚡
npx typestat
👋 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. Types.md for configuring how to work with types in mutations
  4. Filters.md for using tsquery to ignore sections of source files
  5. Custom Mutators.md for including or creating custom mutators

Development

See Development.md. 💖

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.