Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/JoshuaKGoldberg/TypeStat

Converts JavaScript to TypeScript and TypeScript to better TypeScript. ๐Ÿงซ
https://github.com/JoshuaKGoldberg/TypeStat

conversion javascript mutations static-analysis typescript

Last synced: 14 days ago
JSON representation

Converts JavaScript to TypeScript and TypeScript to better TypeScript. ๐Ÿงซ

Awesome Lists containing this project

README

        

TypeStat

Converts JavaScript to TypeScript and TypeScript to better TypeScript. ๐Ÿงซ




๐Ÿ‘ช All Contributors: 12


๐Ÿค Code of Conduct: Kept
๐Ÿงช Coverage
๐Ÿ“ License: MIT
๐Ÿ“ฆ npm version
๐Ÿ’ช TypeScript: Strict

## 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. โšก

```shell
npx typestat
```

> ```shell
> ๐Ÿ‘‹ 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](./docs/Usage.md)** for an explanation of how TypeStat works
2. **[Fixes.md](./docs/Fixes.md)** for the type of fixes TypeStat will generate mutations for
3. **[Cleanups.md](./docs/Cleanups.md)** for the post-fix cleaning TypeStat may apply to files
4. **[Types.md](./docs/Types.md)** for configuring how to work with types in mutations
5. **[Filters.md](./docs/Filters.md)** for using [tsquery](https://github.com/phenomnomnominal/tsquery) to ignore sections of source files
6. **[Custom Mutators.md](./docs/Custom%20Mutators.md)** for including or creating custom mutators

## Development

See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md), then [`.github/DEVELOPMENT.md`](./.github/DEVELOPMENT.md) for general tooling documentation.
For understanding the project, see `./docs` in general, and especially [`./docs/Architecture.md`](./docs/Architecture.md).
Thanks! ๐Ÿ’–

## Contributors



Beyang Liu
Beyang Liu

๐Ÿ’ป
Daniel Stiner
Daniel Stiner

๐Ÿ›
Deleted user
Deleted user

๐Ÿšง
Emerson
Emerson

๐Ÿ’ป
Girish Sontakke
Girish Sontakke

๐Ÿ’ป
Guten
Guten

๐Ÿ›
Ibrahim H.
Ibrahim H.

๐Ÿ’ป


Josh Goldberg โœจ
Josh Goldberg โœจ

๐Ÿšง ๐Ÿ› ๐Ÿ”ง ๐Ÿ’ป ๐Ÿš‡ ๐Ÿ“–
Mark Molinaro
Mark Molinaro

๐Ÿ› ๐Ÿ’ป
Nigel Gilbert
Nigel Gilbert

๐Ÿ›
orionna319
orionna319

๐Ÿ›
rubiesonthesky
rubiesonthesky

๐Ÿ› ๐Ÿšง ๐Ÿ”ง ๐Ÿ’ป โš ๏ธ

> ๐Ÿ’™ This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [TypeStat](https://github.com/JoshuaKGoldberg/TypeStat).