{}const=>[]async()letfn</>var
Development

TypeScript 5.9: now it's easier to start!

In this article, we will analyze the latest improvements in TypeScript 5.9 — deferred imports, new type hints, and clearer errors.

К

Kodik

Author

3 min read

TypeScript is evolving faster than many people can update their projects. Each version brings not only complex features for the "advanced", but also small improvements that are especially valuable to beginners. TypeScript 5.9 several such pleasantries appeared at once — let's analyze them in simple words.

Deferred imports: less headache at startup

Beginners often have one of the following problems: "Where can I get the right module?" or "Why did I import it, but it doesn't work?".

TypeScript 5.9 now has lazy imports.

What does this mean?

  • Previously, if you imported a module, it was immediately pulled into the code — even if it was only used in a rare case.

  • Now you can import it "on demand" — only when it is really needed.

// before
import { heavyLib } from "heavy-lib";

function run() {
  return heavyLib.process(); 
}

// now
async function run() {
  const { heavyLib } = await import("heavy-lib");
  return heavyLib.process();
}
  

For a beginner, this is a plus for two reasons at once:

  1. The project is launched faster.

  2. There are fewer errors with "extra" imports.

🔥 100,000+ students already with us

Tired of reading theory?
Time to code!

Kodik — an app where you learn to code through practice. AI mentor, interactive lessons, real projects.

🤖 AI 24/7
🎓 Certificates
💰 Free
🚀 Start learning
Joined today

New type hints: more magic in the editor

The main feature of TypeScript has always been in type hints right while writing code. But in 5.9 they became smarter:

  • Now the prompts better understand what type is needed in the context.

  • If you missed something or confused it, the editor will tell you the "correct" version.

function printUser(user: { name: string; age: number }) {
  console.log(user.name, user.age);
}

printUser({
  name: "Alice",
  // before TS just swore that something was missing
  // now it will immediately prompt: "do you want to add age?"e?"
});
  

This saves a lot of time for beginners who do not yet know all the details of the types.

Other useful little things

  • Compilation errors have been improved: messages have become more human.

  • The IDE backlight now explains why something is wrong, not just "error".

  • The type system has become more flexible for working with modern JavaScript — less need to manually describe types.

What this means for beginners

TypeScript 5.9 makes getting started even easier:

  • Fewer barriers to imports.

  • More help from the editor.

  • Fewer "incomprehensible" errors.

You can focus on writing code instead of struggling with the tool.

TypeScript 5.9 is about taking care of beginners. Now you have more freedom and fewer mistakes. If you're just starting out, this version is a great place to start.

🙌 We discuss all these features and novelties in our cozy Telegram channel, where we share news from the world of development, analyze new tools and joke about the life of programmers. Join us — it will be interesting!

🎯Stop procrastinating

Liked the article?
Time to practice!

In Kodik, you don't just read — you write code immediately. Theory + practice = real skills.

Instant practice
🧠AI explains code
🏆Certificate

No registration • No card