Create your own opaque sub-type from a type A
A
to be personalized
to name the sub-type
A new type Type<A, Id>
Type<A, Id>
import {A} from 'ts-toolbelt' type EUR = A.Type<number, 'eur'> type USD = A.Type<number, 'usd'> let eurWallet = 10 as EUR let usdWallet = 15 as USD eurWallet = usdWallet // error
Create your own opaque sub-type from a type
A