Type | Treat 2021 – Day 1

Orta

Type or Treat Challenges

Today we’re starting up our second year of Type | Treat (or “Type or Treat”). We will be presenting some “spooky” code challenges that will allow you to dig deeper into the TypeScript language in a fun way.

Starting right now, a new code challenge will be posted every weekday, along with its solution the day after. The last solution will be posted on the weekend.

How To Participate

In order to participate you only need to be able to access the TypeScript website, though we encourage you to share your answers with the community through our dev.to blog post mirrors, the comments on this blog, or via Twitter by tagging the @TypeScript account.

You will want to start here on the blog to find the details on the code challenges for the day. Each post contains 2 links to different challenges which run in the TypeScript playground. Via the playground, you can work on the challenge in your browser and you will be able to test your code live to see if it properly passes the challenge.

How To Share Your Solution

Once you feel you have completed the challenge, you will need to select the Share button in the playground. This will automatically copy a playground URL to your clipboard.

Then either:

  • Go to Twitter, and create a tweet about the challenge, add the link to your code and mention the @TypeScript Twitter account with the hashtag #TypeOrTreat.

  • Leave us a comment with your feedback on the dev.to post, or in this post.

Best Resources for Additional Help

If you need additional help you can utilize the following:

Day 1 Challenges

Beginner/Learner Challenge

Using the new music streaming service from the TypeScript team, Typify, set up and share your Halloween playlist with your friends.

Head to this link and help us figure out the best type to use in one of our function parameters!

Intermediate/Advanced Challenge

You’ve figured out your costume, but making it is a bit of a process. Can you figure out how to make all of the parts come together in a type-safe way?

Head over to start sorting.

1 comment

Leave a comment