Hacker News new | past | comments | ask | show | jobs | submit login

I also wrote something like this and came up with something similar to yours: https://kevincox.ca/2023/03/21/lying-to-typescript/#summary

However I just inlined the "tag". Also like yours but unlike OP there is no runtime tag. Which can be a pro (no extra code) or a con (can't do runtime checks).




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

Search: