you are viewing a single comment's thread
view the rest of the comments
[–] 4 points 6 months ago (1 child)

TypeScript doesn’t really save this

TypeScript tells me the values are booleans. That’s not really the problem.

The types are technically correct. I still have to remember what the arguments mean.

You could use branded/tagged types. Probably not useful in these narrow, one-off occurrences. But if you have a concept that applies across your whole domain, they can be useful.

  • source
  • hideshow 1 child comment