WHAT'S NEW
TypeScript · Lesson 11 of 11 · Final Project

Build Something Awesome.

You’ve learned the language. Now it’s time to put everything together. Build a Developer Learning Tracker that organizes skills, manages progress, and demonstrates real TypeScript programming.

Interfaces Classes Arrays Generics Type Guards Final Challenge
● ● ●   final-project.ts
interface Skill {
  name: string;
  completed: boolean;
}

const developer = "Moe";

const skills: Skill[] = [
  { name: "HTML", completed: true },
  { name: "CSS", completed: true },
  { name: "TypeScript", completed: false }
];
LIVE LEARNING TRACKER
Developer: Moe HTML: Completed CSS: Completed TypeScript: In Progress Progress: 2 / 3
01 / Your Final Project

Meet the Developer Learning Tracker

You’ve reached the last lesson in the TypeScript pathway. Instead of learning one more isolated feature, you’re going to combine the tools you’ve already practiced.

We’ll build a Developer Learning Tracker that stores a developer’s name, tracks skills, updates completion status, and displays a progress report.

Along the way, you’ll use interfaces, arrays, classes, functions, generics, and type guards in one connected program.

Project goal: Create a small application that can manage learning progress without giving up TypeScript’s type safety.
02 / Plan the Data

Define a Skill with an Interface

Before writing application logic, decide what information each skill needs. For our tracker, every skill has a name and a completion status.

skill.ts
interface Skill {
  name: string;
  completed: boolean;
}

const firstSkill: Skill = {
  name: "HTML",
  completed: true
};

console.log(firstSkill.name);
Console Output:
HTML

The interface ensures that every skill has the expected properties and that those properties use the correct types.

03 / Organize the Skills

Store Multiple Skills in an Array

Our tracker needs more than one skill. An array lets us keep related skill objects together.

skills.ts
interface Skill {
  name: string;
  completed: boolean;
}

const skills: Skill[] = [
  { name: "HTML", completed: true },
  { name: "CSS", completed: true },
  { name: "TypeScript", completed: false }
];

console.log("Total skills: " + skills.length);
Console Output:
Total skills: 3

By declaring Skill[], we tell TypeScript that every array item must follow the Skill interface.

04 / Create a Developer

Use a Class to Manage Learning

Now we’ll introduce a class that keeps a developer’s name and skills together.

developer.ts
interface Skill {
  name: string;
  completed: boolean;
}

class Developer {
  constructor(
    public name: string,
    public skills: Skill[]
  ) {}

  showName(): void {
    console.log("Developer: " + this.name);
  }
}

const moe = new Developer("Moe", [
  { name: "HTML", completed: true }
]);

moe.showName();
Console Output:
Developer: Moe

The constructor initializes each developer object. The showName() method provides a simple way to display information about that developer.

05 / Add New Skills

Build a Method That Updates the Tracker

A useful application needs to change over time. Let’s give our class a method for adding skills.

add-skill.ts
interface Skill {
  name: string;
  completed: boolean;
}

class Developer {
  skills: Skill[] = [];

  addSkill(name: string): void {
    this.skills.push({
      name: name,
      completed: false
    });
  }
}

const developer = new Developer();
developer.addSkill("TypeScript");

console.log(developer.skills[0].name);
Console Output:
TypeScript

Using a method gives us a clear, reusable way to update the developer’s learning list.

06 / Mark Skills Complete

Change a Skill’s Completion Status

When someone finishes a skill, the tracker should update its status. We can search through the array and change the matching item.

complete-skill.ts
interface Skill {
  name: string;
  completed: boolean;
}

const skills: Skill[] = [
  { name: "HTML", completed: false }
];

function completeSkill(name: string): void {
  for (const skill of skills) {
    if (skill.name === name) {
      skill.completed = true;
    }
  }
}

completeSkill("HTML");

console.log(skills[0].completed);
Console Output:
true

This combines a function, an array loop, a condition, and a property update.

07 / Add a Generic Helper

Make a Reusable Function

Our project can also benefit from a generic helper that returns the first item in an array, regardless of its element type.

generic-helper.ts
function firstItem<T>(
  items: T[]
): T | undefined {
  return items[0];
}

const firstSkill = firstItem(["HTML", "CSS"]);
const firstLevel = firstItem([1, 2, 3]);

console.log(firstSkill);
console.log(firstLevel);
Console Output:
HTML 1

TypeScript preserves the relationship between the array’s element type and the function’s return type.

08 / Support Flexible Identifiers

Use a Union Type and Type Guard

Some developers may use numeric IDs, while others use usernames. A union type lets our tracker accept either format.

developer-id.ts
type DeveloperId = string | number;

function displayId(id: DeveloperId): void {
  if (typeof id === "number") {
    console.log("Numeric ID: " + id);
  } else {
    console.log("Username: " + id.toUpperCase());
  }
}

displayId(108);
displayId("moe");
Console Output:
Numeric ID: 108 Username: MOE

The typeof check allows TypeScript to narrow the union safely.

09 / Calculate Progress

Count Completed Skills

A tracker becomes more useful when it summarizes progress. We can loop through the skills and count how many have been completed.

progress.ts
interface Skill {
  name: string;
  completed: boolean;
}

const skills: Skill[] = [
  { name: "HTML", completed: true },
  { name: "CSS", completed: true },
  { name: "TypeScript", completed: false }
];

let completed = 0;

for (const skill of skills) {
  if (skill.completed) {
    completed++;
  }
}

console.log("Progress: " +
  completed + " / " + skills.length);
Console Output:
Progress: 2 / 3

This calculation works even as skills are added or completed.

10 / Putting It All Together

Your Complete Developer Learning Tracker

We now have the pieces needed for a working application. Our finished program will:

  • Define the structure of a skill using an interface.
  • Store and manage skills through a class.
  • Use an array to maintain the learning list.
  • Add new skills and mark existing ones complete.
  • Use a generic helper to retrieve a skill.
  • Accept a string or numeric developer ID.
  • Calculate and display learning progress.

The interactive sandbox below contains a starter version. Build the project yourself, then use Load Solution to compare your work with a complete implementation.

You’ve reached an important milestone: You’re no longer just learning individual TypeScript features. You’re combining them to solve a real programming problem.
🚀 Final mC0de Challenge

Build Your Developer Learning Tracker

This is your final challenge for the TypeScript pathway. Use everything you’ve learned to create a working tracker.

Your Mission

  1. Define a Skill interface with name and completed properties.
  2. Create a Developer class with a name, an ID, and an array of skills.
  3. Add a method that inserts new skills into the array.
  4. Add a method that marks a named skill as complete.
  5. Create a method that displays the developer’s learning report.
  6. Calculate the number of completed skills.
  7. Use a union type for the developer’s ID.
  8. Use a type guard to format that ID.
  9. Create a generic function that retrieves the first item from an array.
  10. Run the program and verify that the progress report updates correctly.
Bonus challenge: Add a fourth skill, mark it complete, and verify that the progress count changes automatically.
💻 Interactive TypeScript Sandbox

Build Your Final Project!

Write and test your Developer Learning Tracker. The editor compiles TypeScript in your browser and displays the program’s console output.

Console Output
Lesson 11 Recap · Final Lesson

What You’ve Learned

You’ve Completed the TypeScript Learning Journey!

Throughout this pathway, you’ve learned to:

  • Write TypeScript with explicit and inferred types.
  • Use functions, arrays, and objects.
  • Define reusable interfaces and classes.
  • Build flexible code with generics.
  • Use union types and type guards.
  • Organize application data and logic.
  • Combine TypeScript features into a complete program.
  • Identify and correct compiler errors.

You’ve built a strong foundation for writing structured, maintainable TypeScript applications. Keep experimenting, improving your tracker, and building new projects.

Your Learning Journey

0 / 11 Completed

Mark this final lesson complete below to finish your TypeScript pathway.

🏆
TypeScript · Lesson 11 of 11

You’ve Reached the Finish Line!

From your first TypeScript variable to building a complete Developer Learning Tracker, you’ve made it through the entire pathway. You now have the foundation to build more powerful, type-safe applications.

🎉 TypeScript Pathway Completed!

Congratulations! You’ve completed all 11 TypeScript lessons on mC0de. Keep building, keep experimenting, and keep coding!

PIX0
</> {} JS 01
0101 </> CSS JS HTML PIX0 const {} 1010 async mC0de function return 0101 <div> 1010 PIX0 CSS JS HTML const {} 0101 mC0de
PIX0 // WORLD OF CODE
PIX0 IS PREPARING SOMETHING AWESOME FOR YOU 0%