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: about 22 hours 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 (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:17:23.000Z (about 2 months ago)
- Last Synced: 2024-10-29T11:02:47.798Z (about 2 months ago)
- Topics: conversion, javascript, mutations, static-analysis, typescript
- Language: TypeScript
- Homepage:
- Size: 6.62 MB
- Stars: 2,068
- Watchers: 15
- Forks: 39
- Open Issues: 89
-
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
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
๐
Peter A. Jonsson
๐ ๐ป
orionna319
๐
rubiesonthesky
๐ ๐ง ๐ง ๐ป โ ๏ธ
> ๐ This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [TypeStat](https://github.com/JoshuaKGoldberg/TypeStat).