isDataListKVItemValueComponent
DataList
stable
Type guard that narrows an IDataListKVItem value to the dynamic-component descriptor shape (IDataListKVItemValueComponent). Enables the template to call <component :is> without optional chaining.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- vrequisIDataListKVItem['value']
- The value field of a KV data list item. Can be a string, number, or an IDataListKVItemValueComponent descriptor object.
API
Valeur de retour
La valeur retournée par cet util.
- true when v is an object with a component property; false for primitive values.
Usage
Exemples
Extraits de code prêts à coller.
Narrow value to dynamic component in a template