Skip to content

@attach should accept falsely value #15935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RyanYANG52 opened this issue May 16, 2025 · 0 comments · Fixed by #15939
Closed

@attach should accept falsely value #15935

RyanYANG52 opened this issue May 16, 2025 · 0 comments · Fixed by #15939

Comments

@RyanYANG52
Copy link

Describe the bug

// we use `&&` rather than `?.` so that things like
// `{@attach DEV && something_dev_only()}` work
return fn && fn(node);

as code show, something like this should pass ts check <div {@attach enabled && test}></div>

Reproduction

Image

Logs

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700KF
    Memory: 16.33 GB / 31.82 GB
  Binaries:
    Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.15.1 - ~\AppData\Local\pnpm\pnpm.CMD
    bun: 1.1.40 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (131.0.2903.99)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    svelte: ^5.30.1 => 5.30.1

Severity

annoyance

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

Successfully merging a pull request may close this issue.

2 participants