tsc-baseline
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

🌡️ tsc-baseline

Often times when working on a large codebase or joining a new project, you'll be faced with a lot pre-existing type errors. While it's important to fix these errors, practically speaking, it's not realistic to fix them all at once and will likely be done incrementally over time.

tsc-baseline helps you reduce the noise of pre-existing type errors by allowing you to save a baseline of errors and filter them out of future type-checks.

This is especially useful when you're working on a new feature branch and want to focus on the errors introduced by your changes, rather than the errors that were already present in the codebase.

👋 Hello there! Follow me @linesofcode or visit linesofcode.dev for more cool projects like this one.

📡 Install

npm install tsc-baseline

yarn add tsc-baseline

pnpm add tsc-baseline

🚀 Getting Started

First, run a type-check in a project containing errors and save the results to a file. We refer to this file as the baseline.

yarn tsc | yarn tsc-baseline save

Next, make some changes to your codebase that introduce new errors, and run the type-check again. This time, we'll compare the results to the baseline and filter out pre-existing errors.

Running the following command will print out the new errors to the console.

yarn tsc | yarn tsc-baseline check

If you need to explicitly add an error to the baseline, you can do so by copying the error's hash from the console output and running the following command.

yarn tsc-baseline add 1234

When you're done, you can delete the baseline file.

yarn tsc-baseline clear

Package Sidebar

Install

npm i tsc-baseline

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

71 kB

Total Files

22

Last publish

Collaborators

  • tmikeladze