Interpret string concat calls
fix(compiler-cli): interpret string concat calls (#44167)
Interpret string concat callsfixinterpret string concat calls compiler cli
Committed by crisbeto
commit message
fix(compiler-cli): interpret string concat calls (#44167)
These changes add support for interpreting `String.prototype.concat` calls. We need to support it, because in TypeScript 4.5 string template expressions are transpiled to `concat` calls, rather than string concatenations. See https://github.com/microsoft/TypeScript/pull/45304.
PR Close #44167Editor assessment
An exemplar. The subject names the capability - interpreting string concat calls - and the body teaches why it became necessary: TypeScript 4.5 transpiles template expressions into String.prototype.concat calls rather than plain concatenations, so the compiler-cli's partial interpreter must understand them, with the upstream TypeScript pull request cited. Upstream constraint, consequence, and remedy in two sentences, accurate fix(compiler-cli) framing, and clean hygiene throughout. The upstream transpilation change is the kind of external constraint that makes a fix genuinely instructive, and it is cited precisely.