🔗 Function: component()
component<
P
>(name
,init
,setup
):void
Defined in: src/component.ts:157
Define a component with dependency resolution and setup function (connectedCallback)
🔗 Type Parameters
🔗 P
P
extends ComponentProps
& ValidateComponentProps
<P
>
🔗 Parameters
🔗 name
string
Name of the custom element
🔗 init
{ [K in string | number | symbol]: Initializer<P[K], Component<P>> } = ...
Signals of the component
🔗 setup
Setup
<P
>
Setup function to be called after dependencies are resolved
🔗 Returns
void
🔗 Since
0.14.0
🔗 Throws
If component name is invalid
🔗 Throws
If property name is invalid