{"id":3142,"date":"2021-10-25T14:29:16","date_gmt":"2021-10-25T22:29:16","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/typescript\/?p=3142"},"modified":"2023-04-27T13:05:42","modified_gmt":"2023-04-27T21:05:42","slug":"type-treat-2021-day-1","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/typescript\/type-treat-2021-day-1\/","title":{"rendered":"Type | Treat 2021 &#8211; Day 1"},"content":{"rendered":"<h2>Type or Treat Challenges<\/h2>\n<p>Today we&#8217;re starting up our second year of <code>Type | Treat<\/code> (or &#8220;Type or Treat&#8221;). We will be presenting some &#8220;spooky&#8221; code challenges that will allow you to dig deeper into the TypeScript language in a fun way.<\/p>\n<p>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.<\/p>\n<h2>How To Participate<\/h2>\n<p>In order to participate you only need to be able to access the <a href=\"https:\/\/www.typescriptlang.org\/\" rel=\"nofollow\">TypeScript website<\/a>, though we encourage you to share your answers with the community through our <a href=\"https:\/\/dev.to\/typescript\" rel=\"nofollow\">dev.to blog post mirrors<\/a>, the comments on this blog, or via Twitter by tagging the <a href=\"https:\/\/twitter.com\/typescript\" rel=\"nofollow\">@TypeScript<\/a> account.<\/p>\n<p>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.<\/p>\n<h3>How To Share Your Solution<\/h3>\n<p>Once you feel you have completed the challenge, you will need to select the <strong>Share<\/strong> button in the playground. This will automatically copy a playground URL to your clipboard.<\/p>\n<p>Then either:<\/p>\n<ul>\n<li>Go to Twitter, and create a tweet about the challenge, add the link to your code and mention the <a href=\"https:\/\/twitter.com\/typescript\" rel=\"nofollow\">@TypeScript<\/a> Twitter account with the hashtag <a href=\"https:\/\/twitter.com\/search?q=%23TypeOrTreat\" rel=\"nofollow\">#TypeOrTreat<\/a>.<\/li>\n<li>Leave us a comment with your feedback on the <a href=\"https:\/\/dev.to\/typescript\" rel=\"nofollow\">dev.to<\/a> post, or in this post.<\/li>\n<\/ul>\n<h3>Best Resources for Additional Help<\/h3>\n<p>If you need additional help you can utilize the following:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/intro.html\" rel=\"nofollow\">The New TypeScript Handbook<\/a><\/li>\n<li>The <a href=\"https:\/\/discord.com\/invite\/typescript\" rel=\"nofollow\">TypeScript Community Discord<\/a><\/li>\n<li>The comments on each <a href=\"https:\/\/dev.to\/typescript\" rel=\"nofollow\">Dev.to<\/a> post!<\/li>\n<li>Our previous <a href=\"https:\/\/www.typescriptlang.org\/play\/#gist\/303ebff59a6fc37f88c86e86dbdeb0e8-0\" rel=\"nofollow\"><code>Type | Treat<\/code> 2020 challenges<\/a><\/li>\n<\/ul>\n<h3>Day 1 Challenges<\/h3>\n<h4>Beginner\/Learner Challenge<\/h4>\n<p>Using the new music streaming service from the TypeScript team, Typify, set up and share your Halloween playlist with your friends.<\/p>\n<p>Head to <a href=\"https:\/\/gists.github.com\/927ccc66ae3022dc64c4f650109b937a\" rel=\"nofollow\">this link<\/a> and help us figure out the best type to use in one of our function parameters!<\/p>\n<h4>Intermediate\/Advanced Challenge<\/h4>\n<p>You&#8217;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?<\/p>\n<p>Head over <a href=\"https:\/\/gist.github.com\/orta\/927ccc66ae3022dc64c4f650109b937a\" rel=\"nofollow\">to start sorting<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spooky TypeScript challenges for beginner and intermediate programmers, day 1. <\/p>\n","protected":false},"author":6925,"featured_media":3143,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-typescript"],"acf":[],"blog_post_summary":"<p>Spooky TypeScript challenges for beginner and intermediate programmers, day 1. <\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts\/3142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/users\/6925"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/comments?post=3142"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts\/3142\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/media\/3143"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/media?parent=3142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/categories?post=3142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/tags?post=3142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}