doesn't seem to rehydrate dehydrated app" href="/m/1238275677711499405">
<NoHydration />
everything is fine, but with them there the app doesn't hydrate. No errors.
I assume I'm doing something different than https://github.com/solidjs/solid-start/blob/main/packages/start/src/server/StartServer.tsx but I'm not sure what.any
when I declare what type it is in the parent class? Is there a way to make that work?JSX.IntrinsicElements["div"]
but I'm unsure how to type it with chaining as well as calling it div().className("p-4")()
i
= string.
In other words, I need to construct a generic signature like this.
but it doesn't work. Wondering if it's even possible...url
is passed as a prop, I want the type of the component to be an HTMLAnchor
element, if I pass in an onClick
I want it to be an HTMLButton
etc.
I have the following but it doesn't seem to work. It lets me pass in both an onClick and an href, which shouldn't be possible as href doesn't exist on HTMLButton
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgIilQ3wChSYBPMJOAGWADsBrAFRQHMAeAVTiQAeMJIwAmAZzjiYUJhzgAfOAFcxSTEySiANHADy-ISIlwAFKYCUcALwA+OADcIwUVaWrR6zaPvW4Ab1IASGUoABsAfgAuOB4AbmCIRgBhMOA0Zmj9BKC0ZWlcAAUcMBjpWUYOBIBfBIpqWgYWdg5iiDBxXkNhMUlyuUUVNQ1GLV0DQR6Tcys7R2dXQY8vUZ8beiY2Tl5x+wAyYNM+SeM+mTlgoIjEYhgAOgAJVgBZOjaOrifXgEFGNAALaAAUTCSBAIhgtkuMQmRl6Zlm9icLku12Q6HuXzeJU6WIAQsoYDAkiCwRCoUEgjF0RhHi9se1cfSAMpgFCMUngxiQix1QSQWBwTCqDDAJIbZrbY5wkz9SpLYbecbdU5mSw2JELNxDTwjLS2UxgHExJpbVo4nb6WxWQJBIgwUKMOBcFC2LgAeldNXIXFNLTgeQKIHe1nwYQgYXwcCSqXSzGs-nVc381WqcH+REwofDkbg7tscSAAinput
based on if callback
has a parameter or not. How would I do this?type Foo<T> = <T extends string | number | symbol> = Record<T, (context: Context) => unknown>
I'd like to keep the return type of whatever the function is. How would I use generics to get this to work?type OnlyChild = { play: () => void }
. Is that possible. I know I can use Omit<> but I don't know what the properties of Person are.type MyObj = typeof myObj
But I'm not happy with some of the inferred types. For example (I know...🙄 ) I have a type that is undefined
but needs to be of type undefined | boolean
.
How can I easily modify that nested type? And do it many times with different nested values?combine
but this makes it tricky to do nested state. I found that simply doing seems to work, but this seems too easy. All the examples have the state explicitly created, not inferred. Am I missing something obvious?