# 6.0 들어가며

이번 장에서는 타입 시스템이 동작하는 방식에 대해 보다 심도 있게 다룰 것이다. 가장 먼저, 타입스크립트가 코드 상의 여러 정보를 사용해 타입을 ‘**좁혀 나가는**’ 과정, 그리고 타입 표기 없이도 **타입 추론**을 사용해 타입에 대한 정보를 얻는 법에 대해 배운다. 다음으로 다룰 내용은 **타입 단언**을 사용해 컴파일러가 가진 타입 정보를 임의로 덮어쓰는 법이다. 마지막으로는 **타입을 집합으로 바라보는 관점**에 대해 알아본다.

타입 좁히기와 타입 추론은 프로그래머에게 가해지는 타입 표기의 부담을 줄임으로서 보다 간결한 코드 작성을 가능케 한다. 타입 단언은 외부 라이브러리 사용이나 빠른 프로토타이핑 등의 이유로 타입 검사를 빠르게 건너뛰고 싶은 상황에서 유용할 것이다. 또한 집합으로서 타입을 바라보는 관점은 타입스크립트 뿐만 아니라 정적 타입 언어를 익힐 때 큰 도움이 될 것이다.


---

# 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/06-type-system-deepdive/intro.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.
