Typing component based on props

TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
5 Replies
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
benten
bentenOP•3y ago
Awesome, thank you Although now I think it would be valid to have both an onclick and url, as anchor tags can have click handlers. should be an easy change. cheers 🙂 Hmm, how would I write a typeguard for this type?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
benten
bentenOP•3y ago
Yeah, so I can pass spread the props in a, button, and span tag without ts complaining
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server