채린씨의 티스토리
[TypeChallenges] 13. Hello World (warm-up) 본문
문제
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>>
나의 풀이
type HelloWorld = string
참고자료
https://joshua1988.github.io/ts/guide/basic-types.html#string
'FE > TypeScript' 카테고리의 다른 글
[TypeChallenges] 7. Readonly (easy) (0) | 2023.03.24 |
---|---|
[TypeChallenges] 4. Pick (easy) (0) | 2023.03.24 |
Comments