template literal type

A string literal type built with backticks, such as `on${Capitalize<K>}Change`, that combines other string types.

In more detail

Given the union "username" | "email" it produces "onUsernameChange" | "onEmailChange". Combined with key remapping it generates strongly typed event handler and getter names.

Related terms

Taught in

References