镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
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

  1. Renegade334 commented on Sep 2, 2025

    @Renegade334
    Member

    swc-project/swc#11037 – fixed upstream, but not yet released.

  2. added
    strip-typesIssues and PRs related to TypeScript type stripping.
    confirmed-bugIssues and PRs for confirmed bugs.
    on Sep 3, 2025
  3. pmarchini commented on Sep 27, 2025

    @pmarchini
    Member

    Hey @ssalbdivad, thanks for opening this issue!
    As far as I can tell, this bug has already been fixed in the latest version! 😁

  4. marco-ippolito commented on Sep 27, 2025

    @marco-ippolito
    Member

    We need to update amaro, the automatic update should run tonight

  5. added a commit that references this issue on Sep 30, 2025
  6. added a commit that references this issue on Oct 6, 2025
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