• kibiz0r@midwest.social
    link
    fedilink
    English
    arrow-up
    5
    ·
    11 hours ago

    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.