Types aren't the difficult part, it's TypeScript that's difficult. The documentation is a nightmare and in my experience I saw "any" types being used far too often (which literally defeats the purpose of using TypeScript).
Types aren't the difficult part, it's TypeScript that's difficult. The documentation is a nightmare and in my experience I saw "any" types being used far too often (which literally defeats the purpose of using TypeScript).
I may be missing something, but aren't your type checker functions called at runtime whereas Typescript would be doing static type checking at compile time?
If the type of data you're passing around is erratic beyond development (where, just like TypeScript, a function-based approach illuminates incorrect data being passed around), you're writing bad code and TypeScript is nothing more than a crutch.
I expect most hardline TypeScript people to disagree, but type errors are the least of my concerns thanks to the above approach. It's not just an opinion; it's based on experience/evidence [1].