Literal union with IntelliSense autocomplete support.
Union of literal types
Base type of the literals (defaults to string)
string
Creates a union that accepts a set of literal values while still allowing arbitrary values of the base type. This preserves editor autocomplete for the literals without restricting extensibility.
type Size = LiteralUnion< 'small' | 'medium' | 'large' >;// 'small' | 'medium' | 'large' | (string & {}) Copy
type Size = LiteralUnion< 'small' | 'medium' | 'large' >;// 'small' | 'medium' | 'large' | (string & {})
Literal union with IntelliSense autocomplete support.