CursorBot logoCursorBot

TypeScript help that starts from the compiler message

A TypeScript error is a location plus a constraint. Paste both the code and the diagnostic. CursorBot can explain the mismatch and a type that matches the runtime value.

Prefer a narrower type to a cast

Ask for a guard or a redesign before `as`. A cast hides the bug the compiler found.

Include related types if they live in another file. The error often points at the use site, not the definition.

Example prompt

tsc says this argument is not assignable. Here is the function and the call. Which field is wrong, and how should the type change?

Questions

Does it typecheck the project?

No. It reads what you send. Run tsc locally to confirm.

Start with CursorBot