---
title: "Discussion on \"Effective Typescript#4 타입 설계\" | Hashnode"
description: "Discussion on \"Effective Typescript#4 타입 설계\". 아이템28. 유효한 상태만 표현하는 타입을 지향하기\n아래의 예시는 웹 애플리케이션의 전체 상태에 대한 타입 설계 입니다. 웹 페이지의 상태가 될 수 있는 값들을 정확하게 파악하고 모호함(예시: A상태이자 B상태인)이 없도록 명확하게 구분했습니다.\ninterface RequestPending {\n    state: 'pending';\n}\ninterface RequestError {\n    state: 'error';\n    error: strin..."
url: "https://hashnode.com/posts/effective-typescript4/6311636f56df9e8e5025e048"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Effective Typescript#4 타입 설계](https://blog.lyunho.kim/effective-typescript4?utm_source=hashnode&utm_medium=feed)

아이템28. 유효한 상태만 표현하는 타입을 지향하기 아래의 예시는 웹 애플리케이션의 전체 상태에 대한 타입 설계 입니다. 웹 페이지의 상태가 될 수 있는 값들을 정확하게 파악하고 모호함(예시: A상태이자 B상태인)이 없도록 명확하게 구분했습니다. interface RequestPending { state: 'pending'; } interface RequestError { state: 'error'; error: strin...

Sep 2, 2022 · 5 min read · blog.lyunho.kim  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#7yoa7j6f7iqk7ygs66a97yq4](https://hashnode.com/tag/7yoa7j6f7iqk7ygs66a97yq4)

## Written by

[Lyunho Kim](https://hashnode.com/@lyunhokim)

@lyunhokim · South Korea

  
[View profile](https://hashnode.com/@lyunhokim)

backend developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
