DEV Community

Cover image for Stop letting AI finish your TypeScript exercises
Andrii Pervashov
Andrii Pervashov

Posted on

Stop letting AI finish your TypeScript exercises

Most AI coding assistants optimize for getting you unstuck, not for helping you remember why the solution works.

Ask about generics, narrowing, or mapped types and you'll usually get a correct implementation in seconds. It feels like progress because the problem is gone.

Then the same concept comes up a week later during a PR review, and you're staring at it again.

That's usually not because TypeScript is complicated. You just never had to build the mental model yourself.

The problematic pattern we've all seen

It usually goes something like this:

  1. You hit a type error you don't fully understand.
  2. You paste it into ChatGPT, Claude, Copilot, Cursor, or whatever you're using.
  3. It gives you a working solution.
  4. tsc passes.
  5. You continue with your work.

Nothing about that workflow is inherently bad. If you're trying to ship something, it's often exactly what you should do.

The problem is when that becomes your learning workflow.

The part that actually sticks isn't reading the final code. It's trying to understand why your first attempt failed, what TypeScript was trying to tell you, and how the type system arrived at that error in the first place.

AI removes most of that process. Conveniently.

Unfortunately, that's also the part that turns syntax into intuition.

What has worked better

The developers I've seen improve the fastest usually do something much simpler.

They read one Handbook topic.

They try the exercise without asking AI first.

They write down why they think their solution works.

Only then do they ask for feedback or hints.

That feels much closer to having a mentor than having an autocomplete engine.

That's why I built TS Learn Path

I wanted a repository where AI behaves more like someone reviewing your work than someone doing it for you.

TS Learn Path follows the official TypeScript Handbook and Reference one topic at a time.

It includes:

  • one folder per Handbook topic (exercises.ts / exercises.tsx + NOTES.md)
  • a Git-friendly progress tracker (EN/RU)
  • estimated difficulty and time for every lesson
  • mentor instructions for Cursor, Claude, Codex, Gemini, Copilot, and Windsurf

The tracker isn't really the point.

The mentor rules are.

The instructions tell the AI to review attempts first, ask questions, explain concepts using practical examples, and avoid giving away complete solutions unless you explicitly ask for them.

Live demo: https://apervashov.github.io/typescript-learning-assistant/

The workflow

Tracker → Handbook → exercises.ts + NOTES.md → tsc → mark Done
Enter fullscreen mode Exit fullscreen mode

A prompt like this works well:

I'm on 03) Narrowing. Here's my attempt. Point me in the right direction, but don't solve it.

This one doesn't:

Solve everything.

If the AI ignores your request, remind it. That's exactly why the mentor instructions exist.

How it's different from type-challenges

type-challenges is great if your goal is mastering advanced type-level programming.

TS Learn Path is aimed at something more practical: learning the language in roughly the same order as the Handbook while working on exercises that look like code you'd actually write.

type-challenges TS Learn Path
Focus Type-level puzzles Handbook-based exercises
Progress Personal Git-friendly tracker
AI Optional Mentor behavior included
Best for Advanced type programming Learning and onboarding

The two projects complement each other rather than compete.

Who it's for

  • JavaScript developers moving to TypeScript
  • Juniors learning with Cursor or Copilot
  • Mentors who want something more structured than "watch this playlist"
  • Anyone who's tired of copying correct code without understanding why it's correct

Try it

git clone https://github.com/apervashov/typescript-learning-assistant.git
cd typescript-learning-assistant
npm install
npm start
Enter fullscreen mode Exit fullscreen mode

Start with 01) The Basics.

Treat the AI like a reviewer, not a code generator.

Repository: https://github.com/apervashov/typescript-learning-assistant

Template: https://github.com/apervashov/typescript-learning-assistant/generate

Feedback welcome

Let me know what can be improved here.

Top comments (0)