# 4.8 맺으며

4장에서는 타입스크립트가 제공하는 두 가지 대표적 코드 구조화 수단, 인터페이스와 클래스에 대해 살펴보았다. 인터페이스를 이용해 값의 형태가 따라야 할 제약을 표현하고, 클래스를 이용해 복잡한 개념에 연관된 값과 메소드를 깔끔하게 묶는 법을 다루었다. 또한 클래스 및 인터페이스 확장을 통해 재사용성을 증가시키고, 인터페이스 구현을 사용해 클래스의 형태를 제약하는 방법에 대해서도 배웠다.&#x20;

3장과 4장을 마친 지금, 우리는 타입스크립트의 타입 시스템에 어떤 형태의 타입들이 존재하는지 알게 되었다. 다음으로는 이러한 타입들 사이의 관계에 대해 다룬다. 5장의 주제는 타입의 호환성이다. 즉, 서로 다른 타입이 어떤 경우엔 호환 가능하고 또 그렇지 않은지, 어떤 타입의 값을 다른 타입의 값에 할당하는 일이 허용되는 경우는 언제인지 등의 내용에 대해 다룬다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ahnheejong.gitbook.io/ts-for-jsdev/04-interface-and-class/outro.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
