
This prevents assignability errors when merging declarations of the same variable/property that both define their type as unique symbol, as the names for these declarations merge into the same symbol.A unique symbol type is bound to the symbol of the declaration where it was defined.Two unique symbol types are not assignable to each other.The unique symbol type widens to symbol.The unique symbol type may only be used on a const variable or readonly property declaration.

Unique symbol types have several rules and restrictions: Unique Symbol TypesĪ unique symbol type is created in specific cases when calling the global Symbol function or the global Symbol.for function, or when you use the unique symbol type.

This changes allows the use of an Identifier or PropertyAccessExpression as part of a computed property name in an interface, class, or type literal as long as the type of the expression is a string or numeric literal type, or is a unique symbol type.
