ts-enhance
v0.0.0-alpha
Published
Improves a project's TypeScript code by creating and improving types. ๐
Readme
Usage
ts-enhance is a CLI tool that iteratively improves TypeScript types in existing code.
It can:
- Add type annotations to fix
noImplicitAnyandnoImplicitThistype errors - Annotate missing
nulls andundefineds to fixstrictNullCheckstype errors - Remove unnecessary annotations for types that can be inferred
- Remove unnecessary constituents and members of union types and object types
โก To start, the ts-enhance command will launch an interactive guide to setting up a configuration file. โก
npx ts-enhance๐ Welcome to ts-enhance! ๐ This will create a new ts-enhance.json for you. ...
After, use ts-enhance --config ts-enhance.json to convert your files with the same settings.
Configuration
To get a deeper understanding of ts-enhance, read the following docs pages in order:
- Usage.md for an explanation of how
ts-enhanceworks - Fixes.md for the type of fixes
ts-enhancewill generate mutations for - Cleanups.md for the post-fix cleaning
ts-enhancemay apply to files - Types.md for configuring how to work with types in mutations
- Filters.md for using tsquery to ignore sections of source files
- Custom Mutators.md for including or creating custom mutators
Development
See Development.md. ๐
๐ This package is based on @JoshuaKGoldberg's create-typescript-app.
