TYPESCRIPTChapter 4 · TS Expert
Template Literal Types
Template Literal Types construct types by manipulating strings inside template literal types. They build unions of string literals by combining strings dynamically.
Worked example
How it reads
on_${Status}generates on_success | on_error dynamically- They combine literal strings into type definitions directly

Cloud tip: Template literal types make it easy to type CSS class names, event names, or database queries.


