Skip to content

Work & Development · Frontend Frameworks & TypeScript

TypeScript for Clearer Code

Add types to a goal-tracker feature and check the outside data it receives.

Level
Intermediate
Lessons
9 lessons in 3 modules
Estimated study
About 10 hours
Format
Online, self-paced

Monthly: $0 today with a card, then $34 on day 4 unless you cancel before then. After the trial, 30 days' notice applies. Active on-campus students have academy access included. Check your existing student account before buying another subscription.

Before you start

Recommended preparation:

Use a computer with a keyboard and a current browser. Individual lessons explain the tools needed for each exercise.

Full study requires active Academy access. This course can be audited independently of optional assessed programs.

About this course

After Build Applications with React, add TypeScript to your goal tracker. In about 10 hours, describe records and function inputs, represent different app states and check data from storage or files. Learn which mistakes types catch and which still need runtime checks.

What you will be able to do

  • Define types for application data and component inputs.
  • Use unions and narrowing to model different states.
  • Explain why external data still needs runtime validation.

Course outline

Describe values, records and function inputs, and learn which types the checker can work out.

  1. Describe values and understand inference1 hFree preview
  2. Define goal records and optional information1 h
  3. Write function contracts that expose failure1 h

Represent one of several states, check unknown values and reuse a function without losing type information.

  1. Represent loading and result states with a union1 h
  2. Narrow unknown values before using them1 h
  3. Write a generic that preserves useful information1 h

Add types to a working React feature and check goal data loaded from storage or a file.

  1. Type a React feature and its input events1 h 30 min
  2. Parse external goal arrays into a trusted shape1 h
  3. Deliver a typed feature with runtime evidence1 h 30 min

Related assessed programs

This course belongs to the following optional programs. Each has its own required course bundle, evidence review and separate fee. Each program page shows its approved fee and current registration status.

Web Developer: Non-accredited Cloud Forest Certificate

10 required courses · non-accredited assessed certificate

Work & Development · Digital Skills & AI Literacy

Digital Confidence for Work

Find your files, write clear messages, and check a small workplace project.

Included with Academy

Try lesson 1 free

Work & Development · Digital Skills & AI Literacy

AI for Study and Everyday Work

Write clear requests, check what comes back, and keep private information out.

Included with Academy

Try lesson 1 free

Work & Development · Web Development & Programming

Build Your First Website

Build three linked web pages with clear headings, useful images, and labeled fields.

Included with Academy

Try lesson 1 free