Varun Dhandcodewithvroon.hashnode.dev·Feb 16, 2024Mastering TypeScript Utility Types: A Comprehensive GuideWelcome, fellow developers, to the captivating world of TypeScript utility types! TypeScript equips us with a toolbox of utility types to simplify complex type manipulations. Let's dive right in, understanding their essence with crisp definitions and...Discuss·2 likes·65 readsTypeScript
woodstockwoodstock.hashnode.dev·Feb 6, 2024맵드 타입 기반의 유틸리티 타입 1 - Partial, Required, ReadonlyPartial Partial<T>은 특정 객체 타입의 모든 프로퍼티를 선택적 프로퍼티로 변환한다. 즉, 기존 객체 타입에 정의된 프로퍼티들 중 일부분만 사용할 수 있도록 도와주는 타입이다. 예제 간단한 블로그 플랫폼의 일부를 직접 구현한다고 가정해보자. // 게시글 타입 interface Post { title: string; tags: string[]; content: string; thumbnailURL?: string; } ...DiscussTypeScriptpartial
woodstockwoodstock.hashnode.dev·Feb 6, 2024맵드 타입 기반의 유틸리티 타입 2 - Pick, Omit, RecordPick Pick<T, K>는 특정 객체 타입으로부터 특정 프로퍼티 만을 골라내는 타입이다. 예를 들어 Pick 타입에 T가 name, age가 있는 객체 타입이고 K가 name 이라면 결과는 name만 존재하는 객체 타입이 된다. 예제 다음과 같이 옛날에 작성된 포스트가 하나 존재한다고 가정해보자. interface Post { title: string; tags: string[]; content: string; thumbna...DiscussTypeScriptomit
Karl Bolingerkbolinger.hashnode.dev·Apr 11, 2023Advanced TypeScript Techniques: Leveraging Utility Types to Improve Your Code.TLDR: This article explores advanced TypeScript techniques using utility types to improve code optimization. It covers the benefits of using utility types, how they work, and several examples of how they can be applied in real-world scenarios. By lev...Discuss·74 readsTypeScript
Kushagra Jainwebdevinsights.hashnode.dev·Mar 12, 2023Mastering TypeScript Types with Pick, Exclude, and OmitTypeScript provides several utility types, such as Pick, Exclude, and Omit, which can be confusing to use at times. In this post, we will discuss each of these utility types in detail, so you can use them effectively. The Pick utility type is the eas...Discuss·74 readsTypeScript
Ajayajay020.hashnode.dev·Feb 12, 2023TypeScript Utility TypeTypeScript provides various utility types that make types transformation very easy. We can transform existing types into several other types. These utility types are globally available, so we don't need to import them explicitly. By using these utili...Discuss·35 readsTypeScript
Joseph Tsegentsegsxaviers.hashnode.dev·Jan 30, 2023Into Typescript's utility TypesTypescript offers a few useful features which enhance developer productivity working with types. Utility Types are one of these features, they are types that are available globally meaning they are in-built and work without you importing them from an...Discuss·11 likes·228 readsTypeScript
tomiwatomiwa.hashnode.dev·Jan 21, 202315 Commonly used Utility Types in TypescriptIntroduction Utility types are built-in types in TypeScript that can manipulate and extract information from existing types. They allow you to perform operations such as picking specific properties from an object, making properties read-only, and mor...Discuss·2 likes·102 readsTypeScript