New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ts-enhance

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-enhance

Improves a project's TypeScript code by creating and improving types. đź’—

latest
Source
npmnpm
Version
0.0.0-alpha
Version published
Maintainers
1
Created
Source

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:

  • Usage.md for an explanation of how ts-enhance works
  • Fixes.md for the type of fixes ts-enhance will generate mutations for
  • Cleanups.md for the post-fix cleaning ts-enhance may 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.

FAQs

Package last updated on 12 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts