News for hackers. Stuff that matters.
Re:TypeScript please give us types by hn_throwaway_99 on Friday July 07, 2023 @07:38PM (#36639701)
> or a string that adheres to a certain pattern (like a postal code).

This is somewhat supported with template literal types, https://www.typescriptlang.org/docs/handbook/2/template-lite.... However, there are good technical/performance reasons they don't support, for example, plain regexes - there is a HUGE discussion on this topic here, https://github.com/microsoft/TypeScript/issues/6579.

There are no comments on this comment yet.