rgossiaux/svelte-headlessui

Better error messages on React-style props

Closed this issue · 1 comments

Something I've been thinking about recently--it would be nice if I could add in some error messages if you use React-style prop names (className, onChange, htmlFor, and some SVG attributes come to mind). Ideally I can get these to throw a type error, but even a compile or runtime error will make it a lot friendlier for people porting React code (ie users of Tailwind UI).

Related to #43 which will probably solve this sufficiently (as long as you're using TS--I think that's a reasonable constraint).