-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeDocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScript
Milestone
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.
howinator
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeDocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScript