Skip to content

--experimental-transform-types breaks &&= short circuiting #59737

Description

@ssalbdivad

Version

24.4.0

Platform

Linux ssalb-xps 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

const ark = {}

ark.foo &&= `${ark.foo}1`

// ✅ without --experimental-transform-types: "undefined"
// ❌ with --experimental-transform-types: "undefinedundefined1"
console.log(ark.foo)

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

Should output undefined

What do you see instead?

"undefinedundefined1"

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.strip-typesIssues and PRs related to TypeScript type stripping.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions