0Pricing
TypeScript Academy · Lesson

Intrinsic String Manipulation Types

Use Uppercase, Lowercase, Capitalize, and Uncapitalize.

Built-In String Transformers

TypeScript ships four intrinsic string manipulation types: Uppercase, Lowercase, Capitalize, and Uncapitalize. They transform string literal types at compile time, with no runtime cost.

Uppercase

Uppercase<S> converts every character of a string literal type to upper case. The literal 'hello' becomes the type 'HELLO'.

type Loud = Uppercase<"hello"> // "HELLO"
const x: Loud = "HELLO"
console.log(x)

All lessons in this course

  1. Template Literal Type Basics
  2. Modeling Structured Strings
  3. String Unions and Autocomplete
  4. Intrinsic String Manipulation Types
← Back to TypeScript Academy