Wrapper for primitive types to prevent accidental wrong assignments.
The primary type that is being wrapped.
A unique symbol to differentiate this opaque type from others.
Optional
Unique symbol to differentiate this opaque type from others.
type MyString = Opaque<string, typeof _MyString>;declare const _MyString: unique symbol; Copy
type MyString = Opaque<string, typeof _MyString>;declare const _MyString: unique symbol;
Wrapper for primitive types to prevent accidental wrong assignments.