Comment by codebje
5 hours ago
Isn't that just saying you can do dependent types in TypeScript easily so long as you're willing to give up type checking?
5 hours ago
Isn't that just saying you can do dependent types in TypeScript easily so long as you're willing to give up type checking?
Actually, it's even simpler: you should just be able to use signature overloading:
The article's assertion that TypeScript can't represent this is quite false.