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
Autocomplete: Property 'getOptions' does not exist on type 'IntrinsicAttributes & AutocompleteProps' #325
Comments
Thank you for filing this issue. The problem was due to updating to a sveld without checking the changelog first 😅, which caused a type import (the one being extended by |
The patch has been released with version |
Thanks for the quick update! Now it however lights up with a different error:
This is the code (from the demo): <script lang="ts">
import { Autocomplete } from 'attractions';
async function* getOptions(text) {
yield [{ name: text, details: 'Optional' }, { name: `it highlights the match: ${text}` }];
}
</script>
<Autocomplete getOptions={getOptions} /> |
Hmm. I'm not so familiar with generator functions' types, but do you think type OptionsGetter = (q: string) => AsyncGenerator<Option[], void, void>; would be more appropriate? |
I think this type should work. 👍 |
Does release |
Yes, it's fixed now. Thank you! |
I'm using the Autocomplete element, but TypeScript is complaining that the
getOptions
property doesn't exist.Attractions 3.5.0
Svelte 3.44.2
TypeScript 4.5.2
The text was updated successfully, but these errors were encountered: