← All tools

rogerchappel/typegap

Popularity 65 Updated Development & Build

TypeScript type coverage auditor for finding implicit, any, and unknown type gaps

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

typegap

TypeScript type coverage auditor — find the holes without compiling

---

TypeScript is only as strong as its type annotations. any creeps in during rapid prototyping, functions lose explicit return types, and noImplicitAny stays disabled "just for now." Over time, this erodes the safety net.

typegap works statically — it parses ASTs from .ts/.tsx files and reports type holes without needing tsc to succeed.

Quick Start

The package is not published to npm yet. Install the current version from a source checkout:

git clone https://github.com/rogerchappel/typegap.git
cd typegap
npm ci
npm run build
npm install --global .

# Scan current directory
typegap

# Scan a specific directory with detail
typegap ./src --detail

typegap --format json

Set a minimum coverage threshold (exits 1 if below)

typegap --min-coverage 90

Save and compare baselines

typegap --baseline coverage.json

... later ...

typegap --compare coverage.json


Baseline comparisons report changed and new files, plus files that were present
in the saved baseline but are absent from the current scan. Removed files retain
their previous coverage in both text and JSON output, so deleting a low-coverage
file cannot appear as an unexplained overall improvement.

The global install points at the checkout, so rebuild after pulling changes.
When the first npm release is available, `npm install --global typegap` will
become the registry installation path; it is not supported today.

### Programmatic usage
import { analyzeDirectory } from "./typegap/dist/index.js";

const result = await analyzeDirectory("./src");
console.log(result.coverage);

What It Catches