Developers warn the new standard could introduce unprecedented uncertainty, while executives praise its flexibility and reduced documentation requirements.
You may need a tagged type. It is done on our code base such that currency of one type can’t be operated on currency of another type. The basic is that TAG<number, 'USD'> !== TAG<number, 'EUR'> because even if the underlying type is the same (number), they are of different types on the type system. See also type-fest library that provide a ton more helper type like that
You may need a tagged type. It is done on our code base such that currency of one type can’t be operated on currency of another type. The basic is that
TAG<number, 'USD'> !== TAG<number, 'EUR'>because even if the underlying type is the same (number), they are of different types on the type system. See alsotype-festlibrary that provide a ton more helper type like that