문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
| typescript:interfaces [2019/07/30 16:18] – 만듦 taekgu | typescript:interfaces [2025/04/15 10:05] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== Interfaces ====== | ====== Interfaces ====== | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| + | TypeScript의 핵심 원리 중 하나는 유형 검사가 값이 갖는 모양에 초점을 맞추는 것입니다. 이것은 때때로 " | ||
| + | |||
| + | ===== Our First Interface ===== | ||
| + | <code javascript> | ||
| + | function printLabel(labeledObj: | ||
| + | console.log(labeledObj.label); | ||
| + | } | ||
| + | |||
| + | let myObj = {size: 10, label: "Size 10 Object" | ||
| + | printLabel(myObj); | ||
| + | </ | ||