web-component-base
web-component-base copied to clipboard
feat: infer types for `WebComponent.props` properties
We know the types from the initialization of static props and use this to populate an internal typeMap that is used to restore the type of properties after a full reactivity loop--when the HTML attribute changes to trigger a render, the props are serialized and needs to be restored before assigning to the proxy props
The current problem is that we statically type WebComponent.props to {[key: string]: any} -- is there a way to infer the type from the initialization too?