Start your TypeScript journey with the classic "Hello World" coding challenge. Learn by doing, get instant feedback, and master TypeScript basics step-by-step on TypeScriptPro.
Welcome to your very first TypeScript type challenge: Hello World! 🎉
If you’re new to the world of TypeScript’s type system, you’re in the right place. This challenge is the perfect warm-up to help you get comfortable with type-level programming in TypeScript. Your mission is simple: create a type that returns the string 'Hello, World!'.
Don’t worry if this feels basic—that’s the point! Every journey starts with a single step, and this challenge will help you get familiar with how TypeScript’s type system works. Ready? Let’s dive in!
For this challenge, you will need to change the following code to make the tests pass (no type check errors).
Hello, World!
In Type Challenges, we use the type system itself to do the assertion.
For this challenge, you will need to change the following code to make the tests pass (no type check errors).
// expected to be string
type HelloWorld = any
// you should make this work
type test = Expect<Equal<HelloWorld, string>>
Click the Take the Challenge
button to start coding! Happy Hacking!
This one is easy.
Just assign string
to the HelloWorld
type. And that's it!
type HelloWorld = string
Be the first to access the course, unlock exclusive launch bonuses, and get special early-bird pricing before anyone else.
Only 27 Spots left
Get 1 month early access
Pre-Launch discount
This challenge is originally from here.