Skip to main content

Opaque<Value, Tag>

type Opaque<Value, Tag> = Value & object;

Type that is tagged to distinguish it from the underlying untagged type.

The type Opaque<Value, Tag> is equivalent to Value but is "tagged" with type Tag so that it is structurally distinct from Value.

Type Parameters

Type Parameter
Value
Tag