-
Typescript perfect sync – 3 tricks to keep it tight
Typescript perfect sync can be kept using couple of strategies. Most of us start with simple union types, like this: const ScenarioStatus = 'success' | 'fail' | 'error' | 'other'; So far so good. That works great… until you need to iterate over those values for rendering, validation, or other logic. And now You are stuck with two separate definitions: one array for logic, and one string union for the type. Sooner or later, they’ll fall out of sync and provide headaches to people. You could go for en enum…. Below behold the three TypeScript tricks to make your code tight, hard to break, cleaner, safer, DRYer and resistant to…
-
How to set empty array in dijon using scala
There is a simple method that allows to set empty array in dijon and You will not find it on the main page of dijon repository. dijon.`[]` This is actually a byte array in the end. Oh… and remember that jsoniter will by default remove the empty variables on any kind of DTO when serializing …





