News for hackers. Stuff that matters.
Re:Use Your Type System by mnahkies on Thursday July 24, 2025 @02:29PM (#44674312)
Related https://github.com/microsoft/TypeScript/issues/54925

My specific use case is pattern matching http status codes to an expected response type, and today I'm able to work around it with this kind of construct https://github.com/mnahkies/openapi-code-generator/blob/main... - but it's esoteric, and feels likely to be less efficient to check than what you propose / a range type.

There's runtime checking as well in my implementation, but it's a priority for me to provide good errors at build time

There are no comments on this comment yet.