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

children prop has a default type unknown #2466

Open
theetrain opened this issue Aug 15, 2024 · 0 comments
Open

children prop has a default type unknown #2466

theetrain opened this issue Aug 15, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@theetrain
Copy link

Describe the bug

Related to #2303

The children prop doesn't seem to have a default type of Snippet.

Reproduction

  1. Create a new file A.svelte containing:
<script>
  let { href, children, ...rest } = $props()
</script>

<a href="/test">{@render children()}</a>
  1. Observe the type error on children():

This expression is not callable.
Type '{}' has no call signatures.

Expected behaviour

children is given a type Snippet since it's a reserved name/symbol.

System Info

System:
    OS: macOS 12.7.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 43.38 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.15.1/bin/npm
    pnpm: 8.15.8 - ~/Library/pnpm/pnpm
    bun: 1.1.17 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 127.1.68.134
    Chrome: 127.0.6533.119
    Safari: 17.6
  npmPackages:
    @sveltejs/kit: ^2.0.0 => 2.5.22 
    svelte: ^5.0.0-next.1 => 5.0.0-next.222
  VSCode:
    editor: 1.92.1
    Svelte extension: v108.6.0

Which package is the issue about?

Svelte for VS Code extension, svelte-language-server, svelte-check

Additional Information, eg. Screenshots

image
@theetrain theetrain added the bug Something isn't working label Aug 15, 2024
@jasonlyu123 jasonlyu123 removed the bug Something isn't working label Aug 16, 2024
@dummdidumm dummdidumm added the feature request New feature or request label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants