by kristiandupont · 2y ago · 0 comments
However, that's not the case when it comes to Typescript, because literal and union string types are actually checked at compile time. So what is the problem?
doStuff({userId: foo, itemId: bar});
This allows the order of key/val pairs to move around, making it more robust to mistakes than doStuff: (string,string) => void.