StaffCoder
Typescript
TypeScriptNode.js 24
3 modules · 13 challengesSign up
Modules3 modules · 13 challenges
Module 3 of 3 · 4 challenges

TypeScript Custom Types

Learn to describe your own data and let TypeScript enforce it by building a support ticket desk. Define ticket records with read-only and optional fields and a fixed set of priorities, model an activity feed as tagged events handled case by case with a safe fallback, and build a queue whose storage stays private and whose methods keep working when passed around.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

The Ticket Record

Sign up to unlock
—No data yeteasy
About this challenge

Define a support ticket's shape with a fixed set of priorities, a read-only id and an optional assignee, then open, assign, label and rank tickets.

Solved in a browser IDE and graded by tests. Sign up to solve

Ticket Activity Feed

Sign up to unlock
—No data yeteasy
About this challenge

Model the desk's activity feed as tagged ticket events, describe each kind, fall back safely on unknown kinds and pick out one author's comments.

Solved in a browser IDE and graded by tests. Sign up to solve

The Ticket Queue

Sign up to unlock
—No data yeteasy
About this challenge

Build a ticket queue object that keeps its tickets private, hands out the most urgent one first and keeps working when its take method is passed around as a callback.

Solved in a browser IDE and graded by tests. Sign up to solve

Ticket Board

STAR
Solving it completes the module
—No data yeteasy
About this challenge

Compose the ticket record, activity feed and queue into a live board that replays feed events, lists open tickets in working order and hands the next ticket to a free agent.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.