---
title: "Discussion on \"Conditional subtypes using as clause\" | Hashnode"
description: "Discussion on \"Conditional subtypes using as clause\". Problem Statement\nWhile working on a project. I came across a use case where I need to create a type that needs to be a subtype of a given type including only a particular key.\nconst type Address = {\nId: string,\nname: string,\nsurname: string,\ncountry..."
url: "https://hashnode.com/posts/typescript-conditional-subtypes-using-as-clause/613271585b12102f2987d101"
---

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

Discussion

# [Conditional subtypes using as clause](https://async-await.hashnode.dev/typescript-conditional-subtypes-using-as-clause?utm_source=hashnode&utm_medium=feed)

Problem Statement While working on a project. I came across a use case where I need to create a type that needs to be a subtype of a given type including only a particular key. const type Address = { Id: string, name: string, surname: string, country...

Sep 1, 2021 · 3 min read · async-await.hashnode.dev  
Updated Oct 26, 2022  
Read the article

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

## Written by

[Nikhil Mishra](https://hashnode.com/@async-await)

@async-await · New Delhi, India

  
[View profile](https://hashnode.com/@async-await)

Software Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
