Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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. ๐งซ
- Host: GitHub
- URL: https://github.com/JoshuaKGoldberg/TypeStat
- Owner: JoshuaKGoldberg
- License: mit
- Created: 2018-11-18T01:03:55.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T03:03:20.000Z (6 months ago)
- Last Synced: 2024-05-02T01:44:38.786Z (6 months ago)
- Topics: conversion, javascript, mutations, static-analysis, typescript
- Language: TypeScript
- Homepage:
- Size: 5.68 MB
- Stars: 1,939
- Watchers: 14
- Forks: 36
- Open Issues: 85
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
- awesome - JoshuaKGoldberg/TypeStat - Converts JavaScript to TypeScript and TypeScript to better TypeScript. ๐งซ (TypeScript)
README
TypeStat
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
null
s andundefined
s 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
๐ป
Daniel Stiner
๐
Deleted user
๐ง
Emerson
๐ป
Girish Sontakke
๐ป
Guten
๐
Ibrahim H.
๐ป
Josh Goldberg โจ
๐ง ๐ ๐ง ๐ป ๐ ๐
Mark Molinaro
๐ ๐ป
Nigel Gilbert
๐
orionna319
๐
rubiesonthesky
๐ ๐ง ๐ง ๐ป โ ๏ธ
> ๐ This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [TypeStat](https://github.com/JoshuaKGoldberg/TypeStat).