0.2.3 ā€¢ Published 4 years ago

typecov v0.2.3

Weekly downloads
484
License
MIT
Repository
github
Last release
4 years ago

Features

šŸ‘‰ track type coverage defined as the count of symbols whose type is not any / the total count of symbols šŸ‘‰ display type coverage directly in GitHub šŸ‘‰ set minimal type coverage and automatically fail PRs šŸ‘‰ supports monorepos

Motivation

Despite using --strict mode in tsconfig you can still have anys in your codebase. This tool gives you a good overview if PR that you are going to merge increases or decreases overall type coverage and where exactly types should be improved.

Install

npm install --save-dev typecov

Usage

TypeCov is built on CodeChecks.io - open source code review automation platform.

Are you new to codechecks? Check out getting started guide (it's simple)!

Install package and then add to your codechecks.yml file:

checks:
  - name: typecov
    options:
      # atLeast: 99
      # name: webapp
      # tsconfigPath: ./tsconfig.prod.json

Under the hood it uses type-coverage package.

API

typecov(options: Options): Promise\

options

interface Options {
  name?: string; // will be added to check name
  tsconfigPath?: string; //defaults to tsconfig.json
  atLeast?: number;
  ignoreFiles?: string[];
  ignoreCatch?: boolean;
  strict?: boolean;
}
name

optional string Defaults: Type Coverage Specify the name for check. Might be useful in monorepos.

tsconfigPath

optional string Default: tsconfig.json Path to typescript project configuration

atLeast

optional number Defaults: undefined Example: atLeast: 99 Fail if coverage rate < this value.

ignoreFiles

optional string[] Defaults: undefined Specify the ignored for checks files. See type-coverage's description for the reference.

ignoreCatch

optional string Defaults: undefined See type-coverage's description for the reference.

strict

optional string Defaults: undefined See type-coverage's description for the reference.

Contributing

All contributions are welcomed. Read more in CONTRIBUTING.md

Licence

MIT @ codechecks.io

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago