---
title: "How to decode TypeScript and Rust compiler errors without leaving your browser."
description: "Highlight deeply nested TypeScript generic errors or Rust borrow-checker diagnostics on GitHub, CI logs, or docs and get an instant plain-English fix in place."
canonical_url: "https://vezz.me/use-cases/explain-typescript-and-rust-compiler-errors/"
type: "pseo-use-cases"
category: "use-cases"
topic: "Compiler Error Workflow"
intent: "Best for developers debugging TS2322/TS2345 generic pyramids or Rust ownership/lifetime diagnostics in GitHub Actions, Vercel logs, and documentation."
---

# How to decode TypeScript and Rust compiler errors without leaving your browser.

Highlight deeply nested TypeScript generic errors or Rust borrow-checker diagnostics on GitHub, CI logs, or docs and get an instant plain-English fix in place.

> **Best fit:** Best for developers debugging TS2322/TS2345 generic pyramids or Rust ownership/lifetime diagnostics in GitHub Actions, Vercel logs, and documentation.

## Live Webpage Walkthrough

- **Source:** GitHub Actions CI Log — TypeScript 5.6 Build Output (`github.com/org/api-server/actions/runs/982341`)
- **Recommended Context Mode:** Detailed

**Highlighted Passage:**
> error TS2322: Type 'Promise<{ id: string; status: string; metadata: Record<string, unknown>; }>' is not assignable to type 'Promise<WebhookResult>'.
  Type '{ id: string; status: string; metadata: Record<string, unknown>; }' is not assignable to type 'WebhookResult'.
    Types of property 'status' are incompatible.
      Type 'string' is not assignable to type '"delivered" | "queued" | "failed"'.

**User Question (Shortcut):** "What is the root cause of this TS2322 error and what is the cleanest fix without using any?"

**Vezz me On-Screen Answer:**
1. **Root cause**: Your function returns a widened `status: string`, whereas `WebhookResult` requires the narrow literal union `"delivered" | "queued" | "failed"`.
2. **Fix for literal objects**: Add `as const` to the status property (e.g., `status: "delivered" as const`) or use `satisfies WebhookResult` on the return object.
3. **Fix for external inputs**: Narrow the string with a Zod enum or type guard before returning instead of casting with `as any`.

**Suggested Follow-Ups:**
- "Show me the cleanest type guard function for narrowing `status`."
- "Why did TypeScript widen `status` to `string` in the first place?"

## Step-by-step workflow

1. **Select the entire multi-line error pyramid**: TypeScript reads top-down from outer wrapper types to the inner property failure, while Rust puts key borrow notes (`help:` and `note:`) at the bottom. Highlight the full diagnostic block.
2. **Press Ctrl+Shift+X and ask for the leaf mismatch**: Ask Vezz me which single inner property, generic constraint, or lifetime parameter actually failed so you can ignore 30 lines of wrapper types.
3. **Request a strict, idiomatic fix**: Use our Senior Engineer Code Reviewer preset to get a type-safe fix (`satisfies`, discriminated union narrowing, or borrowing `&[T]`) rather than `as any` or `.clone()` spam.

## Why compiler errors are hardest to read in browser CI logs

Inside your local IDE you have hover tooltips, but when a build fails in GitHub Actions, GitLab CI, Vercel, or Cloudflare Pages, you are staring at raw terminal text in a browser tab.

- TypeScript compound types (Prisma queries, tRPC routers, React Hook Form generics) often generate 40+ lines of nested type output
- Rust borrow-checker errors (E0382, E0502, E0597) interleave line numbers, lifetime annotations (`'a`), and trait bounds (`Send + Sync`) across async `.await` points
- Highlighting the diagnostic directly inside your CI log tab isolates the single failing constraint in under 5 seconds

## What to ask Vezz me on TypeScript and Rust diagnostics

Use targeted prompts that demand type safety rather than quick suppression hacks.

- "Which leaf property or generic parameter caused this assignability error?"
- "Why does this value not live long enough across the `.await` point, and how do I restructure ownership?"
- "Give me the cleanest fix that preserves strict types without `as any` or `@ts-expect-error`."

## Compiler Error Debugging Workflows

Comparing in-page selection against tab-switching and generic error-code searches.

| Approach | Strengths | Tradeoffs |
| --- | --- | --- |
| Vezz me on CI / Docs Tab | Immediately isolating the inner leaf mismatch right beside your build log | Requires highlighting the full multi-line error block |
| Searching error code (e.g. TS2322 / E0382) | Learning the general definition of the compiler diagnostic | Too generic—TS2322 covers thousands of unrelated type mismatches |
| Copy-pasting into a separate chat tab | Long multi-file refactoring sessions | Loses surrounding PR diff and build-log context |

## Frequently asked questions

### Does Vezz me work inside GitHub Actions raw log viewers?

Yes. Any selectable text inside GitHub Actions step logs, Vercel build output, or raw log files can be highlighted and analyzed with Ctrl+Shift+X.

### Can I include the failing function code along with the error?

Yes. If the error and code snippet are near each other on the page, highlight both together, or paste the error into the prompt box while highlighting the code.

### How do I stop the AI from suggesting 'as any' or '@ts-ignore'?

Import our Senior Engineer Code Reviewer preset, which explicitly instructs the AI to preserve strict type safety and avoid unsafe casts.

## Related guides

- [Explain Code Snippets & Stack Traces](https://vezz.me/use-cases/explain-code-snippets-and-errors/): General workflow for unfamiliar code blocks and runtime stack traces.
- [Senior Engineer Code Reviewer Preset](https://vezz.me/prompts/senior-engineer-code-reviewer/): 1-click prompt preset that enforces type-safe, production-grade code fixes.
- [Vezz me for Software Developers](https://vezz.me/for/software-developers/): Complete browser workflow for engineering teams.
- [Vezz me on GitHub](https://vezz.me/for/github/): How to use Vezz me across PRs, diffs, and Actions logs.
