paint-brush
Utility types in Typescript - Part 1: Partial, Required, Readonlyby@andemosa
4,638 reads
4,638 reads

Utility types in Typescript - Part 1: Partial, Required, Readonly

by Anderson Osayerie3mMay 22nd, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Typescript allows developers to create new custom types as necessary during development. Typesript provides some globally available utility types. These utility types allows the developer to carry out type transformations. The utility type Partial creates a new type where all the properties of the input type T are set to optional. The utility type Required creates a new type where all the properties of the input type `T` are set to required. It is the opposite of Partial. The utility type Readonly creates a new type where all the properties of the input type T are set to readonly.

Company Mentioned

Mention Thumbnail
featured image - Utility types in Typescript - Part 1: Partial, Required, Readonly
Anderson Osayerie HackerNoon profile picture
Anderson Osayerie

Anderson Osayerie

@andemosa

Survived an Infinite Tsukuyomi. Loves football

About @andemosa
LEARN MORE ABOUT @ANDEMOSA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Anderson Osayerie HackerNoon profile picture
Anderson Osayerie@andemosa
Survived an Infinite Tsukuyomi. Loves football

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite