๐ Reference
๐ Chapter
Index Signature
Expressions & Operators
Utility types
typeof
- typeof
typeof ์ฐ์ฐ์
- typeofย : ๊ฐ์ฒด ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ฒด ํ์
์ผ๋ก ๋ณํํด์ฃผ๋ ์ฐ์ฐ์
- JavaScript์์๋ ์ด๋ฏธย ํํ์ ์ปจํ
์คํธ์์ ์ฌ์ฉํ ์ ์๋ย
typeof
์ฐ์ฐ์๊ฐ ์๋ค.
- ์์ 1
console.log(typeof "Hello world");
- TypeScript๋ย ํ์
**์ปจํ
์คํธ์์ ๋ณ์๋ ํ๋กํผํฐ์ ํ์
์ ์ถ๋ก ํ ์ ์๋ย
typeof
์ฐ์ฐ์๋ฅผ ์ถ๊ฐํ๋ค.
- ์์ 2
let s = "hello";
let n: typeof s;
์์