@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}/>>или что-то такое
@mo
type word = /\w+/;
const a: word = "hello";
const b: string = a;
const c: word = <word> b;
const d: word = word.match(b) ? b : "error";
@anki