template literal
A JavaScript string written in backticks that can embed expressions with ${...}, such as `Hello, ${name}!`.
In more detail
Unlike ordinary quotes, template literals can also span several lines. Template literal types use the same backtick syntax in type positions to build string literal types.
Related terms
- template literal type — A string literal type built with backticks, such as `on${Capitalize<K>}Change`, that combines other string types.
- string — The type for text values, such as a name or an email address.
Taught in
- Conditional Types: Ternary Types And Type Inference With infer — Production TypeScript
- Mapped Types, Key Remapping With as And Template Literals — Production TypeScript