-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
FIX: '"onclick"' does not exist in type #4
Comments
Since all components have I know it gives type warnings, but I hope Svelte language support adjust it in future. What do you think? |
I think better to add onclick defenition as optional parameter in the propDef, since no need to pass its value it automatically recognise onclick event and stop warning. onclick is heavily used event, instead of having warning it is better to eliminate the warning. I test it and it fix the issue. I don't see any downside of adding to declare const __propDef whether they fix it in the future or not. I happy to contribute if want to. |
I can add to some components, but not that simple since there are quite few A11y restrictions. I will add to some components but I will leave the rest to users. |
v0.4.5 is published. |
Please add
onclick?: () => void;
to the following declaration in the components that use onclick event such as Button, Avatar, Dropdown, ... etc.declare const __propDef: { props: { onclick?: () => void; }; }
The text was updated successfully, but these errors were encountered: