A realistic first-month plan for typescript

A month will not make anyone an expert in TypeScript, and a plan that pretends otherwise collapses in week two. What a month can do is get you writing typed code most days, reading compiler errors without panic, and finishing one small thing. This plan assumes about an hour a day, five days a week, with weekends off and one buffer day per week for catching up.

Week one: annotate code you already understand

Do not start with new material. Take three small JavaScript functions you have written before — a total, a formatter, a filter — and add types to them. You are learning where types go, not what they mean.

  • Days one and two: variable annotations and function signatures, including return types.
  • Days three and four: describe one object with an interface and use it in two places.
  • Day five: convert an array of objects and notice what the compiler infers without your help.

Compile after every change. The feedback loop is the lesson, and a slow one teaches nothing.

Week two: narrowing and unions, the part that pays off forever

This is the week most self-taught learners skip, and it is the week that makes the rest of TypeScript make sense. A union is a value that could be one of several shapes; narrowing is how you prove which one you have before touching it.

Write one function that accepts three different shapes and handles each with a switch on a shared tag field. Delete a case on purpose and read the compiler’s reply. Then add it back. Repeat with typeof for primitives and in for object shapes, and you will have covered most of what real code needs.

Week three: a small project in strict mode

Pick something that stores data locally and needs no login: a reading log, a unit converter with a form, a command-line tool that summarises a CSV. Use at most one framework, or none at all. Turn strict on before the first commit, not after.

The point of the week is not features. It is discovering where your data model is vague. When you cannot name a field’s type, the field is usually doing two jobs, and splitting it is the actual work.

Week four: refactor and read

Go back to the code from week one. You will find annotations you no longer need and any keywords you now regret. Replace one with a real type, derive one interface from another, and read the type definition of a library function you use every day.

Spend the last day writing down the three things that still confuse you. That short list is your next month, and it will serve you better than any generic curriculum.

When the month does not go to plan

It usually does not. If a week slips, cut scope from the project rather than skipping week two, because narrowing is the foundation everything later leans on. If an hour a day is unrealistic, do thirty minutes five times a week and accept that the project ships smaller than you imagined.

Judge the month by what you can do without a tutorial open: describe a data shape, handle a union completely, and explain an error message in your own words. Those three abilities are worth more than a finished feature list, and they are what the next month builds on.