Opaque types in TypeScript
Have you ever called a multi-argument function with arguments in the wrong order? TypeScript does a great job of preventing that from happening - as long as arguments have incompatible types. But can we make TypeScript warn us about this kind of mistakes if, for instance, all arguments are numbers? In other words: if numbers were fruits, can TypeScript know the difference between apples and oranges?