Skip to content

Literal Types

In TypeScript, a literal string is a string that has a specific value. For example, the string "hello" is a literal string with the value hello.

Prerequisites

Content License under CC BY-NC-ND 4.0