Skip to content

[Not really a bug] change in es5 output from string interpolationΒ #48776

Closed
@bigopon

Description

@bigopon

Bug Report

πŸ”Ž Search Terms

string concat

πŸ•— Version & Regression Information

4.5.x

  • This is not a crash
  • This changed between versions 4.4.x and 4.5.x

⏯ Playground Link

https://www.typescriptlang.org/play?target=1&ts=4.5.5#code/G4QwTgBCELwQBgEgN4CMC+AHAHvIA

πŸ’» Code

var a = `${b}px`

πŸ™ Actual behavior

output:

"use strict";
var a = "".concat(b, "px");

πŸ™‚ Expected behavior

"use strict";
var a = b + "px";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions