TypeScript Utility Types
Uppercase<S> — intrinsic string transformation
Uppercase maps the input string type using uppercase conversion, including each member of a literal union. It is an intrinsic implemented by the checker, not an ordinary user-defined type alias implementation. The transformation is not locale-aware; it does not change an actual string value. A broad string argument need not produce a finite literal union. Example output: "READY". Verified with strict TypeScript 5.8.3, ES2022 and Node.js 22.16.0. This utility affects static typing; no runtime validation or transformation is supplied by the type itself.
Formal Syntax & Structure
typescript syntaxtypescript
Uppercase<S>Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| S | S extends string | String type or union of string types to transform. |
Working Example
Example Snippettypescript
type Label = Uppercase<"ready">;const label: Label = "READY";console.log(label);