panzerklein·5 年前·議論Supporting static range types is crazy hard. Only full-on math languages like Idris can do that. If you need runtime checks and types without duplication use something later like zod or io-ts. They can derive ts types automatically