svelte-multiselect icon indicating copy to clipboard operation
svelte-multiselect copied to clipboard

Infer more precise types for `bind:selected` and `let:option`

Open janosh opened this issue 3 years ago • 1 comments

Figure out if generics (or anything) can be used to infer the type of bind:selected and let:option in slot components correctly from type of options prop. See https://github.com/sveltejs/language-tools/issues/442#issuecomment-726377055 for related question.

janosh avatar Apr 22 '22 10:04 janosh

Goal is to fix type errors like this:

Screen Shot 2022-04-22 at 12 15 02

janosh avatar Apr 22 '22 13:04 janosh

Yes, this would help a lot!

Michael-Reich avatar Nov 30 '22 21:11 Michael-Reich

@janosh I'm up for helping with this, just checking to see if perhaps you're already working on it. Let me know if you'd like a PR for this :)

joelmukuthu avatar Dec 13 '22 08:12 joelmukuthu

@joelmukuthu Yes, a PR that fixes this would be amazing. 👍

I have no working branch for this yet so feel free to start fresh from main.

janosh avatar Dec 17 '22 02:12 janosh