Skip to content

Latest commit

 

History

History

09-challenge

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Challenge 09

[Jamie] You're lying. You didn't see anything because nothing was happening. I haven't done anything wrong!

[🌟 Vixen] I literally saw you and 💋 Crystal with my own two eyes. Would you like me to describe the unicorn tattoo on your left cheek? Nice one, by the way.

[🪩Jamie, sweating] Damn it. You did see. What are you going to do?

[🌟 Vixen] 🪩Jamie Glitterglum. It's not what I am going to do to you but rather what you are going to do for me.

[Jamie] Huh?

[🌟 Vixen] We've been arguing with Santa about our pay. You seem like someone uniquely positioned to help get him to change his mind.

[Jamie] You absolute jerk! You're blackmailing me!

[🌟 Vixen] Look, we all have our own goals. Get 💋 Crystal to convince him to pay us what we're worth. We literally haven't had a pay raise since 2009. This shouldn't be so hard, but you know 🎅 Santa. He could care less about the rest of us.

[Jamie] Well how am I supposed to do that?

[🌟 Vixen] There's an npm I've been working on, santas-special-list. Honestly it’s a mess of untyped spaghetti code and patched dependencies, so good luck with that. Let's start there. It needs types. I was supposed to do it, but I need some cover so I can discuss all this with the other reindeer. You make the types for me so I can slip away for a few hours. I'll find you tomorrow and let you know what you need to do next.

[Jamie] I hate you. I have always hated you. Now I hate you more.

[🌟 Vixen] After what you're about to do for me, I think we're going to be great friends. 🖤

Jamie sure is in trouble. Help Jamie do 🌟 Vixen's job by making types for the santas-special-list package. Things are really heating up in the North Pole!

Hint What do you do, in TypeScript, if you have a situation where there's an npm you'd like to use but it doesn't have types? You need some way to declare types for that node module.

Expected Behavior

import type { Status, Child, List } from 'santas-special-list'

type Actual01 = Status // => 'naughty' | 'nice'

type Actual02 = Child // => { name: string, status: Status }

type Actual03 = List // => Child[]

Prompt by Dimitri Mitropoulos of Michigan TypeScript.

Code by Dimitri Mitropoulos of SquiggleConf.