Code Monkey home page Code Monkey logo

typestat's Introduction

TypeStat

Converts JavaScript to TypeScript and TypeScript to better TypeScript.

Code Style: Prettier TypeScript: Strict Build Status NPM version

TypeStat logo: the TypeScript blue square with rounded corners, but a plus sign instead of 'TS'

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 nulls and undefineds to get you started with --strictNullChecks!

โšก To start, the typestat command will launch an interactive guide to setting up a configuration file. โšก

npx typestat
๐Ÿ‘‹ 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 for an explanation of how TypeStat works
  2. Fixes.md for the type of fixes TypeStat will generate mutations for
  3. Cleanups.md for the post-fix cleaning TypeStat 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. ๐Ÿ’–

typestat's People

Contributors

beyang avatar bitsnaps avatar dependabot-preview[bot] avatar dependabot[bot] avatar emday4prez avatar girishsontakke avatar gitter-badger avatar joshuakgoldberg avatar renovate-bot avatar renovate[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.