TypeScriptの正規表現
TypeScript v5.5
から型が効くようになった
https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#regular-expression-syntax-checking
code:ts
let myRegex = /@robot(\s+(please|immediately)))? do some task/;
// ~
// error!
// Unexpected ')'. Did you mean to escape it with backslash?
実装者は
@graphemecluster
https://github.com/microsoft/TypeScript/pull/55600
https://zenn.dev/cybozu_frontend/articles/349e9a778dfe0b