Closed
Description
Bug Report
π Search Terms
Template literals, moment
π Version & Regression Information
This began happening with the release of #45304 when targeting ES5.
β― Playground Link
π» Code
import * as moment from 'moment';
window.alert(`Moment: ${moment()}`);
π Actual behavior
In 4.5.2+, this compiles to "Moment: ".concat(moment())
which evaluates to "Moment: Wed Nov 17..."
π Expected behavior
In previous versions of Typescript, this compiled to "Moment: " + moment()
which resolves to "Moment: 1637....
.
This change is breaking and was not documented in the release notes for 4.5.