element-vir - v26.14.0
Preparing search index...
wrapDefineElement
Function wrapDefineElement
wrapDefineElement
<
TagNameRequirement
extends
`
${
string
}
-
${
string
}
`
=
`
${
string
}
-
${
string
}
`
,
InputsRequirement
extends
PropertyInitMapBase
=
{}
,
StateRequirement
extends
PropertyInitMapBase
=
{}
,
EventsInitRequirement
extends
EventsInitMap
=
{}
,
>
(
options
?:
PartialWithNullable
<
{
assertInputs
:
(
inputInit
:
DeclarativeElementInit
<
`
${
string
}
-
${
string
}
`
,
{}
,
{}
,
{}
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
readonly
string
[]
,
readonly
string
[]
,
>
,
)
=>
void
;
transformInputs
:
(
inputInit
:
DeclarativeElementInit
<
`
${
string
}
-
${
string
}
`
,
{}
,
{}
,
{}
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
readonly
string
[]
,
readonly
string
[]
,
>
,
)
=>
DeclarativeElementInit
<
`
${
string
}
-
${
string
}
`
,
{}
,
{}
,
{}
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
readonly
string
[]
,
readonly
string
[]
,
>
;
}
,
>
,
)
:
<
Inputs
extends
PropertyInitMapBase
>
(
...
errorParams
:
DeclarativeElementInputErrorParams
<
Inputs
>
,
)
=>
<
const
TagName
extends
`
${
string
}
-
${
string
}
`
,
State
extends
PropertyInitMapBase
,
EventsInit
extends
EventsInitMap
,
const
HostClassKeys
extends
`
${
string
}
-
${
string
}
-
${
string
}
`
=
`
${
TagName
}
-
`
,
const
CssVarKeys
extends
`
${
string
}
-
${
string
}
-
${
string
}
`
=
`
${
TagName
}
-
`
,
const
SlotNames
extends
readonly
string
[]
=
readonly
[
]
,
const
TestIds
extends
readonly
string
[]
=
readonly
[
]
,
>
(
inputs
:
DeclarativeElementInit
<
TagName
,
Inputs
,
State
,
EventsInit
,
HostClassKeys
,
CssVarKeys
,
SlotNames
,
TestIds
,
>
,
)
=>
DeclarativeElementDefinition
<
TagName
,
Inputs
,
State
,
EventsInit
,
HostClassKeys
,
CssVarKeys
,
SlotNames
,
TestIds
,
>
Wraps
defineElement
in a superset of requirements. For example:
You could create element definition functions that require all elements to start with a common prefix, like
vir-
.
You could create element definition functions that require all elements to have
at least
a specified set of input properties.
Etc.
Type Parameters
TagNameRequirement
extends
`
${
string
}
-
${
string
}
`
=
`
${
string
}
-
${
string
}
`
InputsRequirement
extends
PropertyInitMapBase
=
{}
StateRequirement
extends
PropertyInitMapBase
=
{}
EventsInitRequirement
extends
EventsInitMap
=
{}
Parameters
Optional
options
:
PartialWithNullable
<
{
assertInputs
:
(
inputInit
:
DeclarativeElementInit
<
`
${
string
}
-
${
string
}
`
,
{}
,
{}
,
{}
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
readonly
string
[]
,
readonly
string
[]
,
>
,
)
=>
void
;
transformInputs
:
(
inputInit
:
DeclarativeElementInit
<
`
${
string
}
-
${
string
}
`
,
{}
,
{}
,
{}
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
readonly
string
[]
,
readonly
string
[]
,
>
,
)
=>
DeclarativeElementInit
<
`
${
string
}
-
${
string
}
`
,
{}
,
{}
,
{}
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
`
${
string
}
-
${
string
}
-
${
string
}
`
,
readonly
string
[]
,
readonly
string
[]
,
>
;
}
,
>
Returns
<
Inputs
extends
PropertyInitMapBase
>
(
...
errorParams
:
DeclarativeElementInputErrorParams
<
Inputs
>
,
)
=>
<
const
TagName
extends
`
${
string
}
-
${
string
}
`
,
State
extends
PropertyInitMapBase
,
EventsInit
extends
EventsInitMap
,
const
HostClassKeys
extends
`
${
string
}
-
${
string
}
-
${
string
}
`
=
`
${
TagName
}
-
`
,
const
CssVarKeys
extends
`
${
string
}
-
${
string
}
-
${
string
}
`
=
`
${
TagName
}
-
`
,
const
SlotNames
extends
readonly
string
[]
=
readonly
[
]
,
const
TestIds
extends
readonly
string
[]
=
readonly
[
]
,
>
(
inputs
:
DeclarativeElementInit
<
TagName
,
Inputs
,
State
,
EventsInit
,
HostClassKeys
,
CssVarKeys
,
SlotNames
,
TestIds
,
>
,
)
=>
DeclarativeElementDefinition
<
TagName
,
Inputs
,
State
,
EventsInit
,
HostClassKeys
,
CssVarKeys
,
SlotNames
,
TestIds
,
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
element-vir - v26.14.0
Loading...
Wraps defineElement in a superset of requirements. For example:
vir-.