Хочу, чтобы TS умел создавать типы из регексов, это будет имба
@anki можно пример?
@motype word = /\w+/;const a: word = "hello";const b: string = a;const c: word = <word> b;const d: word = word.match(b) ? b : "error";@anki
@mo Хотелось бы чтобы это выглядело примерно как type Phone = String<Regex</\d{11}/>>или что-то такое
@anki можно пример?