Typescript Utility Types

0.0(0)
studied byStudied by 6 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

Partial

Constructs a type with all properties of T set to optional.

2
New cards

Required

Constructs a type consisting of all properties of T set to required.

3
New cards

Readonly

Constructs a type with all properties of T set to readonly.

4
New cards
**Record

Constructs a type with a set of properties K of type T.

5
New cards
**Pick

Constructs a type by picking the set of properties K from T.

6
New cards
**Omit

Constructs a type by omitting the set of properties K from T.

7
New cards
**Exclude

Constructs a type by excluding from T all properties that are assignable to U.

8
New cards
**Extract

Constructs a type by extracting from T all properties that are assignable to U.

9
New cards
**NonNullable**

Constructs a type by excluding null and undefined from T.

10
New cards
**Parameters**

Constructs a tuple type from the types used in the parameters of a function type T.

11
New cards
**ConstructorParameters**

Constructs a tuple or array type from the types used in the parameters of a constructor type T.

12
New cards
**ReturnType**

Constructs a type consisting of the return type of function type T.

13
New cards
**InstanceType**

Constructs a type consisting of the instance type of a constructor function type T.

14
New cards
**ThisParameterType**

Extracts the type of the this parameter for a function type, or unknown if the function type has no this parameter.

15
New cards
**OmitThisParameter**

Removes the this parameter from a function type.

16
New cards
**ThisType**

Marks an object type as being contextually this-typed.

17
New cards
**Uppercase**

Constructs a string type by converting all characters in a string type S to uppercase.

18
New cards
**Lowercase**

Constructs a string type by converting all characters in a string type S to lowercase.

19
New cards
**Capitalize**

Constructs a string type by capitalizing the first character in a string type S.

20
New cards
**Uncapitalize**

Constructs a string type by un-capitalizing the first character in a string type S.