Skip to content
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

Typescript non-null assertion operator in bind:this causes svelte compiler error #8228

Closed
anxpara opened this issue Jan 26, 2023 · 1 comment

Comments

@anxpara
Copy link

anxpara commented Jan 26, 2023

Describe the bug

Using ! in bind:this={myObject.member!.element} causes the svelte compiler error 'Expected }'

Reproduction

replit isn't behaving, nor is the code block in this editor, so here's the code to repro in a gist: https://gist.github.com/anxpara/5451bf518878dad25f897b0e065c3721

Logs

`Expected }
    at error (/node_modules/svelte/compiler.mjs:16669:19)
    at Parser$1.error (/node_modules/svelte/compiler.mjs:16747:9)
    at Parser$1.eat (/node_modules/svelte/compiler.mjs:16761:18)
    at read_sequence (/node_modules/svelte/compiler.mjs:15996:20)
    at read_attribute_value (/node_modules/svelte/compiler.mjs:15936:17)
    at read_attribute (/node_modules/svelte/compiler.mjs:15826:17)
    at tag (/node_modules/svelte/compiler.mjs:15665:25)
    at new Parser$1 (/node_modules/svelte/compiler.mjs:16706:21)
    at parse$I (/node_modules/svelte/compiler.mjs:16838:20)
    at compile (/node_modules/svelte/compiler.mjs:46610:17)`

System Info

`System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz
    Memory: 17.22 GB / 31.90 GB
  Binaries:
    Node: 18.13.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.3.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 108.0.5359.126
    Edge: Spartan (44.19041.1266.0), Chromium (109.0.1518.55)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    svelte: ^3.54.0 => 3.55.1`

Severity

annoyance

@Conduitry
Copy link
Member

Duplicate of #4701.

@Conduitry Conduitry closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants