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

Should it be possible to type snippet args using JSDoc? #11336

Open
brunnerh opened this issue Apr 25, 2024 · 0 comments
Open

Should it be possible to type snippet args using JSDoc? #11336

brunnerh opened this issue Apr 25, 2024 · 0 comments

Comments

@brunnerh
Copy link
Member

Describe the bug

Snippets that are passed to components can be typed as parts of $props but how about snippets defined and used locally?

Workaround: Just use TS.

Reproduction

{#snippet test(/** @type {number} */ arg)}
	{arg}
{/snippet}

Expected identifier or destructure pattern

Logs

No response

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
    Memory: 10.15 GB / 31.92 GB
  Binaries:
    Node: 18.19.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.2.0 - ~\AppData\Roaming\npm\npm.CMD
    pnpm: 8.6.9 - ~\AppData\Local\pnpm\pnpm.EXE
  Browsers:
    Chrome: 123.0.6312.124
    Edge: Spartan (), Chromium (123.0.2420.97), ChromiumDev ()
    Internet Explorer: 11.0.19041.3636

Severity

annoyance

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

1 participant