Skip to content

tsgo emits incorrect string value when encountering a backslash before a non-special character #3906

@mariusschulz

Description

@mariusschulz

Steps to reproduce

const enum Currency {
  Euro = "\€",
}

const currency = Currency.Euro;

Behavior with typescript@6.0

"use strict";
const currency = "\u20AC" /* Currency.Euro */;

Behavior with tsgo

"use strict";
const currency = "\u00E2\uFFFD\uFFFD" /* Currency.Euro */;

Metadata

Metadata

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