Skip to content

Latest commit

 

History

History

08-challenge

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Challenge 08

[🎅 Santa's noticed that 💋 Crystal Claus (his wife) is a little "on-edge" lately. He doesn't know why, but he wants to give her some much needed attention. 🎅 Santa doesn't know about 💋 Crystal's affair with Jamie Glitterglum]

[🎅 Santa, drawing 💋 Crystal in for a kiss] 💋 Crystal, my sweet, I thought we'd draw a bath and take the night to ourselves.

[💋 Crystal] Oh, I had plans dear.

[🎅 Santa] Surely you can reschedule?

[💋 Crystal] Um. I guess I could.

[🎅 Santa] Is that a new perfume you're wearing? Where have I smelled that before? It's heavenly.

[💋 Crystal, quickly and nervously] You know what! No problem! Let's get to it!

[🎅 Santa] Marvelous, now I just need to freshen up the environment. I think I'll turn on the mood lights, prepare some chocolate strawberries, and set the bath to 327.59 degrees. Not too cold, not too hot. And compliant with ISO 3103 standards for liquid enjoyment.

Only 🎅 Santa, only you could turn romance into a NASA launch checklist. Still, let's help 🎅 Santa set the environment up for a night with Mrs. Claus.

Yes, they use Kelvin, none of that Fahrenheit nonsense. It's the North Pole, not Florida. Long story on that we'll save for Advent of TypeScript 2025.

Hint Node.JS defines globals for things like process.env. How, in TypeScript, can you extend those globals to include your custom environment variables?

Expected Behavior

const { MOOD_LIGHTS } = process.env

type Actual01 = typeof MOOD_LIGHTS // => 'true'

const { BATH_TEMPERATURE } = process.env

type Actual02 = typeof BATH_TEMPERATURE // => '327.59'

const { STRAWBERRIES } = process.env

type Actual03 = typeof STRAWBERRIES // => 'chocolate'

Prompt by Dimitri Mitropoulos of Michigan TypeScript.

Code by Dimitri Mitropoulos of SquiggleConf.