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

Missing types information #1813

Closed
FalseDev opened this issue Sep 28, 2023 · 1 comment · Fixed by #1841
Closed

Missing types information #1813

FalseDev opened this issue Sep 28, 2023 · 1 comment · Fixed by #1841

Comments

@FalseDev
Copy link

I tried using the form example from here but got the following errors from svelte LSP in Visual Studio Code:

Type '{ name: string; selected: string; }' is not assignable to type 'RadioButtonGroupProps'.
  Object literal may only specify known properties, and '"name"' does not exist in type 'RadioButtonGroupProps'.

Type '{ id: string; labelText: string; value: string; }' is not assignable to type 'SelectProps'.
  Object literal may only specify known properties, and '"value"' does not exist in type 'SelectProps'.

After digging things up, I finally figured out that the shown properties are missing from the type definitions.

Is there any way to temporarily fix this while a patch is being made?

@metonym
Copy link
Collaborator

metonym commented Nov 6, 2023

The name prop has been added to RadioButtonGroup (#1037).

For the Select, the reason for the type error is that it's a typo. I've corrected this in the docs via #1841.

The correct prop to use on Select should be selected instead of value.

- <Select bind:value={selected} />
+ <Select bind:selected />

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

Successfully merging a pull request may close this issue.

2 participants