Replies: 4 comments
-
|
[우아한 타입스크립트] interface Square {
width: number;
}
interface Rectangle extends Square {
height: number;
}
type Shape = Square | Rectangle;
function calculateArea(shape: Shape) {
if(shape instanceof Rectangle) {
return shape.width * shape.height;
}else{
return shape.width * shape.width;
}Q1. shape instanceof Rectangle이 오류가 나는 이유는 무엇일까요? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
<우아한 타입스크립트>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
<우아한 타입스크립트> Q. 일반적인 컴파일과 타입스크립트 트랜스파일의 차이를 설명해주세요. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Q1. 타입스크립트의 컴파일 순서를 알려주세요 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[5주차 -2] 키워드 및 질문
[우아한 타입스크립트]
<6장 타입스크립트 컴파일>
Beta Was this translation helpful? Give feedback.
All reactions