Pragmatic AI Labs

Working with Data in TypeScript 7

Build in-demand skills with a full year of Coursera Plus, now $239. Save now.

Pragmatic AI Labs

Working with Data in TypeScript 7

Alfredo Deza

Instructor: Alfredo Deza

Included with Coursera PlusLearn more

Gain insight into a topic and learn the fundamentals.
Beginner level

Recommended experience

2 weeks to complete
at 10 hours a week
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
Beginner level

Recommended experience

2 weeks to complete
at 10 hours a week
Flexible schedule
Learn at your own pace

What you'll learn

  • Type data from files, servers, errors and the environment as unknown, and narrow it

  • Validate data with Zod and Valibot schemas, and read their errors

  • Build and test a data loader that refuses bad data with a clear message

Details to know

Shareable certificate

Add to your LinkedIn profile

Recently updated!

November 2026

Assessments

5 assignments

Taught in English

See how employees at top companies are mastering in-demand skills

 logos of Petrobras, TATA, Danone, Capgemini, P&G and L'Oreal

Build your subject-matter expertise

This course is part of the TypeScript 7 for Beginners Specialization
When you enroll in this course, you'll also be enrolled in this Specialization.
  • Learn new concepts from industry experts
  • Gain a foundational understanding of a subject or tool
  • Develop job-relevant skills with hands-on projects
  • Earn a shareable career certificate

There are 4 modules in this course

You see a type promise a number while the data holds a string, and the compiler say nothing. You see JSON.parse's any let a typo through to a TypeError, and unknown catch it as TS18046. You narrow a parsed todo by hand, one check at a time. Then you see that an async function hands back a promise, that a forgotten await is TS2322, and that Oxlint's type-aware rule catches a promise nobody waits for. Finally you read a file with Node's fs module, see a missing file fail with ENOENT, and treat it as an empty list.

What's included

11 videos9 readings1 assignment

You install Zod and write a schema: a description of the data that still exists while the program runs. You infer a type from it, so the type and the check never disagree, and use it in the todo loader. You see Zod refuse a todo with an empty title before the program prints anything, read errors that name the row and the field, and use safeParse to skip a bad row and keep going. Then you write the same schema in Valibot, look at the Standard Schema interface both libraries share, and write one helper that accepts either.

What's included

10 videos6 readings1 assignment

You fetch JSON with Node's built-in fetch from a server on your own machine, and see that its body is unknown. You see that a 404 is still an answer, check the response status before reading the body, and test it with Node's test runner. You see that any value can be thrown, so a caught error is unknown, and narrow it before using it. Then you read environment variables that may be undefined, give them defaults and checks, and validate the todo loader's settings with Zod.

What's included

10 videos6 readings1 assignment

You add the code that works on checked data: a counter of open todos and a list of todos with their status, with no checks of their own. You write tests for valid data, for invalid data, and with fixtures kept in files that go through the real loader. Then you read the project's brief, see the finished program count a valid file, refuse an invalid one with one clear message and exit code 1, and treat a missing file as no todos, proven by one check with five steps.

What's included

10 videos6 readings2 assignments

Earn a career certificate

Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.

Instructor

Alfredo Deza
Pragmatic AI Labs
44 Courses6,236 learners

Offered by

Explore more from Software Development

Why people choose Coursera for their career

Felipe M.

Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."

Jennifer J.

Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."

Larry W.

Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."

Chaitanya A.

"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

What brings you to Coursera today?

Frequently asked questions