Skip to content

tsgo breaks type soundness for lone-surrogate string literals #3899

@mariusschulz

Description

@mariusschulz

Steps to reproduce

const x: "\uD800" = "\uDC00";

Behavior with typescript@6.0

bug.ts:1:7 - error TS2322: Type '"\uDC00"' is not assignable to type '"\uD800"'.

1 const x: "\uD800" = "\uDC00";
        ~

Behavior with tsgo

Typechecks (but shouldn't).

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions