Lowercase<S>

Converts each character in the string literal type S to lowercase.

Since TS 4.1 Spec ↗

Syntax

Lowercase<StringType>

Returns

string literal type — A string literal type with every character lowercased.

Examples

type Quiet = Lowercase<'HELLO'>; // 'hello'
type Normalize<T extends string> = Lowercase<T>;
type Slug = Normalize<'About-Us'>; // 'about-us'

Notes

An intrinsic compiler type that distributes over unions and template literal types. It only transforms types and produces no runtime code.

See also