Defines an element with inputs. Note that this function must be called twice, due to TypeScript type inference limitations.
These errorParams is present when there are problems with the Inputs type. If it is present, the error should be fixed. This should always be empty.
errorParams
Inputs
import {defineElement, html} from 'element-vir';const MyElement = defineElement<{username: string}>()({ tagName: 'my-element', render({inputs}) { return html` <p>hi: ${inputs.username}</p> `; },}); Copy
import {defineElement, html} from 'element-vir';const MyElement = defineElement<{username: string}>()({ tagName: 'my-element', render({inputs}) { return html` <p>hi: ${inputs.username}</p> `; },});
Defines an element with inputs. Note that this function must be called twice, due to TypeScript type inference limitations.