Support number separators in templates
feat(compiler): support number separators in templates (#42672)
Support number separators in templatesfeatsupport number separators templates compiler
Committed by crisbeto
commit message
feat(compiler): support number separators in templates (#42672)
As of ES2021, JavaScript allows using underscores as separators inside numbers, in order to make them more readable (e.g. `1_000_000` vs `1000000`). TypeScript has had support for separators for a while so these changes expand the template parser to handle them as well.
PR Close #42672Editor assessment
An exemplar. The subject states the feature - number separators in templates - and the body teaches its grounding: ES2021 allows underscore separators for readability, TypeScript already supported them, so the template parser is extended to match. Context, precedent, and scope of change in two sentences, with an accurate feat(compiler) framing and clean hygiene. A reader finishes the message understanding both the what and the why. The ES2021 grounding and the TypeScript-parity note give the parser change a standards rationale, which is what makes the message instructive.