ts-enhance
TypeScript icon, indicating that this package has built-in type declarations

0.0.0-alphaย โ€ขย Publicย โ€ขย Published

ts-enhance

Alpha version of a package rename. Not stable. Do not use!

Improves a project's TypeScript code by creating and improving types. ๐Ÿ’—

Usage

ts-enhance is a CLI tool that iteratively improves TypeScript types in existing code. It can:

  • Add type annotations to fix noImplicitAny and noImplicitThis type errors
  • Annotate missing nulls and undefineds to fix strictNullChecks type 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:

  1. Usage.md for an explanation of how ts-enhance works
  2. Fixes.md for the type of fixes ts-enhance will generate mutations for
  3. Cleanups.md for the post-fix cleaning ts-enhance may apply to files
  4. Types.md for configuring how to work with types in mutations
  5. Filters.md for using tsquery to ignore sections of source files
  6. Custom Mutators.md for including or creating custom mutators

Development

See Development.md. ๐Ÿ’–

๐Ÿ’™ This package is based on @JoshuaKGoldberg's create-typescript-app.

Dependentsโ€‚(0)

Package Sidebar

Install

npm i ts-enhance

Weekly Downloads

0

Version

0.0.0-alpha

License

MIT

Unpacked Size

626 kB

Total Files

626

Last publish

Collaborators

  • joshuakgoldberg