Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't use them directly much, but template literal generic and contidiontal types is probably the closest a mainstream language has inched towards dependent types.

Some examples of TypeScript power:

- SQL database in TypeScript types: https://github.com/codemix/ts-sql

- Statically typed raw SQL queries: https://github.com/andywer/squid?tab=readme-ov-file#tag-func...

- (Someone fill in your TS hackery for me)



There are various programming language interpreters that run entirely in the type system:

- BF: https://github.com/susisu/typefuck

- Assembly: https://github.com/judehunter/ts-asm




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: