Skip to content

Glossary: TypeScript Beyond the Basics

as (key renaming)

Also written: key remapping

In a mapped type, `as` after the key renames each property. For example, `[S in Status as `${S}Count`]` turns `shipped` into `shippedCount`.

Where the book teaches it

Related terms

Mapped typeTemplate literal type