Explain TypeScript errors

Paste a TypeScript error, such as "Type 'string' is not assignable to type 'number'", and Vibe explains it in plain English: what the error code means, which value doesn't fit and why the code still runs without the check.

tsc-errors.txt

Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.

Vibe9 lines selected

Press Explain it for the sample, or paste your own code first.

What this TypeScript errors sample shows

reading tsc output
Each error line is the file, (line,column), the error code and the message: src/invoice.ts(16,28): error TS2322 points at line 16, column 28, the "12000" price. npm run typecheck ran tsc --noEmit, which printed 3 errors and ended with exit code 2. The code, such as TS2322, names the kind of mistake; the message after it gives this case.
the 3 codes
TS2322: a value doesn't match its declared type, here the text "12000" where LineItem says price: number. TS2345: an argument doesn't match the parameter; discount?: number can be undefined, and money takes only a number. TS2339: the code reads a property the type doesn't have, invoice.total; Invoice has only id, items and discount.
the fix that worked
The price became the number 12000, the discount call became money(invoice.discount ?? 0), and the total is now worked out as subtotal - (invoice.discount ?? 0) instead of read from a property that doesn't exist. tsc printed nothing, and node src/invoice.ts printed Subtotal $174.00 and Total $174.00 with exit code 0.
Node.js runs it anyway
Node.js 25.7.0 ran the unfixed file without a word about types: node src/invoice.ts printed Subtotal $12000240030.00, Discount $NaN and Total $NaN with exit code 0. The text price was joined to the tax as text, and the next item's total was added to the end of it. Node.js runs the JavaScript and ignores the types; only tsc checks them.

Good to know

  • Run with TypeScript 5.9.3, Node.js 25.7.0 and npm 11.10.1 on Linux in a test folder mounted at /home/dev/invoice, with "strict": true in tsconfig.json. tsc prints paths from the project folder, so yours start with your own folder names.
  • With --pretty, tsc printed in color, each error as src/invoice.ts:16:28 - error TS2322, then the line with ~~~~~ under the value, and for TS2322 also the line where price is declared. It ended with Found 3 errors in the same file, starting at: src/invoice.ts:16.

Before you trust it: Silencing the errors keeps the wrong numbers. With "12000" as any, invoice.discount! and a // @ts-ignore line, tsc printed nothing, and the run printed the same Subtotal $12000240030.00, Discount $NaN and Total $NaN with exit code 0. When an AI tool fixes type errors this way, run the code and read what it prints.

Explain TypeScript errors beside your editor

Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).

Install on Mac

curl -fsSL https://unvibe.site/install.sh | bash

Paste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.

No install warning? Use Unvibe in your browser

Opening the .dmg the first time

Unvibe isn't notarized by Apple yet, so macOS blocks the first open until you allow it. Its code is public on GitHub.

  1. Open the .dmg, drag Unvibe to Applications and open it. macOS says it can't verify it. Click Done, not the blue Move to Trash.
    macOS dialog: “Unvibe” Not Opened, with a blue Move to Trash button on top and Done under it
    Real screen, macOS 26. On macOS 15 the two buttons sit side by side.
  2. System Settings › Privacy & Security, scroll down to Security, then press Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.
    macOS Privacy & Security, Security section: Unvibe was blocked to protect your Mac, with the Open Anyway button
    Real screen, macOS 15
  3. Unvibe opens. You only do this once, and later versions install from inside the app with one click.
    Unvibe's first window: Vibe says Hey! I'm Vibe. I explain the code AI writes for you, right beside your editor, over the title Understand the code AI writes
    Real screen, Unvibe 0.1.51 on macOS 26

The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open