TypeScript
TypeScript copied to clipboard
Provide User-Friendly Message for Extended Unicode Escapes in Regular Expressions in Non-Unicode Modes
This replaces the error message of /\u{10000}/ from Hexadecimal digit expected. to Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. (message analogous to TS1530), as @k1tikurisu pointed out in his article [in Japanese] that it’s hard to understand the intention of the message.
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.
I’ve reordered the commits and let the checks perform both before and after your suggested change to ensure everything works as expected. (But I don‘t understand why there’s an unrelated assertion error before the rerun.)